From 9a2441307fd3ac0918977564323a0e0c6e3d56f4 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Thu, 23 Apr 2015 10:04:02 +0200 Subject: Add new ultimaker style button The new cura/utlimaker style has its own button themes in Cura, use these as our preliminary default button. Signed-off-by: Olliver Schinagl --- data/themes/default/colorclasses.edc | 3 +++ data/themes/default/edc/elm/button.edc | 23 ++++++++++++++--------- data/themes/default/fonts.edc | 7 ++++--- data/themes/default/img/button_normal.png | Bin 1774 -> 231 bytes data/themes/default/img/button_outline.png | Bin 0 -> 242 bytes 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 data/themes/default/img/button_outline.png diff --git a/data/themes/default/colorclasses.edc b/data/themes/default/colorclasses.edc index fe1af86..51cfa89 100644 --- a/data/themes/default/colorclasses.edc +++ b/data/themes/default/colorclasses.edc @@ -78,6 +78,9 @@ color_classes { color_class { name: "button_text"; color: FN_COL_DEFAULT; } + color_class { name: "button_text_focused"; + color: FN_COL_FOCUSED; + } color_class { name: "button_text_disabled"; color: FN_COL_DISABLE; } diff --git a/data/themes/default/edc/elm/button.edc b/data/themes/default/edc/elm/button.edc index a848ea6..2ad5dcf 100644 --- a/data/themes/default/edc/elm/button.edc +++ b/data/themes/default/edc/elm/button.edc @@ -1,6 +1,6 @@ group { name: "elm/button/base/default"; images.image: "button_normal.png" COMP; - images.image: "button_clicked.png" COMP; + images.image: "button_outline.png" COMP; #define ICON 1 #define LABEL 2 #define MASK 3 @@ -72,17 +72,20 @@ group { name: "elm/button/base/default"; parts { part { name: "base"; mouse_events: 0; description { state: "default" 0.0; - image.normal: "button_normal.png"; - image.border: 4 4 3 5; + image.normal: "button_outline.png"; + image.border: 8 8 8 8; image.middle: SOLID; - rel1.offset: -1 0; - rel2.offset: 0 1; + rel1.offset: 0 0; + rel2.offset: -1 -1; fill.smooth: 0; } + description { state: "focused" 0.0; + inherit: "default" 0.0; + image.normal: "button_normal.png"; + } description { state: "clicked" 0.0; inherit: "default" 0.0; - image.normal: "button_clicked.png"; - image.border: 5 5 4 6; + image.normal: "button_normal.png"; } } part { name: "icon_clip"; type: RECT; @@ -152,7 +155,6 @@ group { name: "elm/button/base/default"; } } part { name: "elm.text"; type: TEXT; mouse_events: 0; - effect: SHADOW BOTTOM; scale: 1; description { state: "default" 0.0; rel1.offset: 0 5; @@ -162,7 +164,6 @@ group { name: "elm/button/base/default"; rel2.offset: -8 -8; rel2.to: "base"; color_class: "button_text"; - color3: 255 255 255 255; text { font: FN; size: 10; align: 0.5 0.5; min: 0 0; @@ -170,6 +171,10 @@ group { name: "elm/button/base/default"; } visible: 0; } + description { state: "focused" 0.0; + inherit: "default" 0.0; + color_class: "button_text_focused"; + } description { state: "visible" 0.0; inherit: "default" 0.0; rel1.offset: 2 5; diff --git a/data/themes/default/fonts.edc b/data/themes/default/fonts.edc index a7fba6d..5c1313c 100644 --- a/data/themes/default/fonts.edc +++ b/data/themes/default/fonts.edc @@ -15,11 +15,12 @@ #define FNIT "Sans:style=Oblique" #define FNBDIT "Sans:style=Bold Italic" -#define FN_COL_DEFAULT_BASIC 255 255 255 255 +#define FN_COL_DEFAULT_BASIC 0 0 0 255 /* fonts.edc not sure if this one is neccesary */ #define FN_COL_DEFAULT 255 255 255 255; color3: 0 0 0 128 -#define FN_COL_DEFAULT_SOFT_SHADOW 255 255 255 255; color3: 0 0 0 18 -#define FN_COL_HIGHLIGHT 51 153 255 255; color2: 51 153 255 24; color3: 51 153 255 18 +#define FN_COL_FOCUSED 0 0 0 255; color3: 0 0 0 128 +#define FN_COL_DEFAULT_SOFT_SHADOW 0 0 0 255; color3: 0 0 0 18 +#define FN_COL_HIGHLIGHT 0 0 0 255; color2: 51 153 255 24; color3: 51 153 255 18 #define FN_COL_HIGHLIGHT_CLICKED 255 255 255 255; color2: 51 153 255 64; color3: 51 153 255 32 #define FN_COL_HIGHLIGHT_DISABLE 51 153 255 64; color2: 51 153 255 16; color3: 51 153 255 8 #define FN_COL_MID_GREY 128 128 128 255 diff --git a/data/themes/default/img/button_normal.png b/data/themes/default/img/button_normal.png index a7feada..1502436 100644 Binary files a/data/themes/default/img/button_normal.png and b/data/themes/default/img/button_normal.png differ diff --git a/data/themes/default/img/button_outline.png b/data/themes/default/img/button_outline.png new file mode 100644 index 0000000..ae7f19c Binary files /dev/null and b/data/themes/default/img/button_outline.png differ -- cgit v0.12