Skip to content

Commit

Permalink
Issue #150: ColorPicker - Add style for ColorPicker with ColorPicker.…
Browse files Browse the repository at this point in the history
…STYLE_CLASS_BUTTON styleclass
  • Loading branch information
p-dukke committed Apr 17, 2020
1 parent f4626bf commit f71d6ee
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
40 changes: 40 additions & 0 deletions jmetro/src/main/resources/jfxtras/styles/jmetro/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,47 @@ totally specific (always using direct child) and cover all cases, which would be
* *
******************************************************************************/

.color-picker.button {
-fx-border-color: transparent;
-fx-border-width: 2;

-fx-background-radius: 0;
-fx-background-insets: 0;
-fx-background-color: button_background_color;

-fx-font-family: "Segoe UI";
-fx-text-fill: text_color;
}

.color-picker.button:hover,
.color-picker.button:focused:hover {
-fx-border-color: border_hover_color;
}

.color-picker.button:pressed,
.color-picker.button:focused:pressed {
-fx-border-color: background_pressed_color;
-fx-background-color: background_pressed_color;
}

.color-picker.button:focused {
-fx-border-color: transparent, focus_ring_border_color;
-fx-border-width: 1, 1;
/*noinspection CssInvalidFunction*/
-fx-border-style: solid, segments(1, 2);
-fx-border-radius: 0, 0;
-fx-border-insets: 1 1 1 1, 0;
}

.color-picker.button:showing {
-fx-border-color: transparent, focus_ring_border_color;
-fx-background-color: background_pressed_color;
-fx-border-width: 1, 1;
/*noinspection CssInvalidFunction*/
-fx-border-style: solid, segments(1, 2);
-fx-border-radius: 0, 0;
-fx-border-insets: 1 1 1 1, 0;
}

/*******************************************************************************
* *
Expand Down
17 changes: 17 additions & 0 deletions jmetro/src/main/resources/jfxtras/styles/jmetro/dark_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -713,4 +713,21 @@ Text {

.mdl2-assets {
text_color: white;
}

/*******************************************************************************
* *
* ColorPicker *
* *
******************************************************************************/

.color-picker.button {
button_background_color: #333333;
background_pressed_color: #666666;

border_hover_color: #858585;

text_color: white;

focus_ring_border_color: white;
}
19 changes: 18 additions & 1 deletion jmetro/src/main/resources/jfxtras/styles/jmetro/light_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -685,4 +685,21 @@ Text {

.mdl2-assets {
text_color: #111;
}
}

/*******************************************************************************
* *
* ColorPicker *
* *
******************************************************************************/

.color-picker.button {
button_background_color: #cccccc;
background_pressed_color: #999999;

border_hover_color: #7a7a7a;

text_color: #111;

focus_ring_border_color: white;
}

0 comments on commit f71d6ee

Please sign in to comment.