From 17cad991097839496e6f30cee7424ba38fd35908 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 26 Nov 2012 12:28:52 +0000 Subject: [PATCH] better than a poke in the eye with a sharp stick -> notification done for dark/default SVN revision: 79703 --- data/themes/Makefile.am | 2 + data/themes/default.edc | 1 + data/themes/edc/notification.edc | 186 +++++++++++++++++++++++++++++++ data/themes/img/glow_exclam.png | Bin 0 -> 2185 bytes 4 files changed, 189 insertions(+) create mode 100644 data/themes/edc/notification.edc create mode 100644 data/themes/img/glow_exclam.png diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am index a109e44df..7538b1248 100644 --- a/data/themes/Makefile.am +++ b/data/themes/Makefile.am @@ -43,6 +43,7 @@ edc/ilist.edc \ edc/init.edc \ edc/label.edc \ edc/menu.edc \ +edc/notification.edc \ edc/pager.edc \ edc/pointer.edc \ edc/preview.edc \ @@ -186,6 +187,7 @@ img/downlight_glow_right.png \ img/downlight_glow_up.png \ img/eth.png \ img/exlclam.png \ +img/glow_exclam.png \ img/glow_lock_double.png \ img/glow_lock_locked.png \ img/glow_lock_unlocked.png \ diff --git a/data/themes/default.edc b/data/themes/default.edc index 6c3d4ec38..a0943afd4 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -51,6 +51,7 @@ collections { #include "edc/colors.edc" #include "edc/edgebindings.edc" #include "edc/randr.edc" +#include "edc/notification.edc" // port unchanged stuff so this can work as a replacement #include "edc/O/backlight.edc" diff --git a/data/themes/edc/notification.edc b/data/themes/edc/notification.edc new file mode 100644 index 000000000..86910f3b4 --- /dev/null +++ b/data/themes/edc/notification.edc @@ -0,0 +1,186 @@ +group { name: "e/modules/notification/logo"; + images.image: "glow_exclam.png" COMP; + parts { + part { name: "base"; mouse_events: 0; + description { state: "default" 0.0; + image.normal: "glow_exclam.png"; + max: 48 48; + aspect: 1.0 1.0; + } + } + } +} + +group { name: "e/modules/notification/main"; + images.image: "darken_rounded_square.png" COMP; + images.image: "sym_close_light_normal.png" COMP; + images.image: "sym_close_light_selected.png" COMP; + data.item: "app_icon_max" "48 48"; + data.item: "shaped" "1"; + styles { + style { name: "notification_style_nowrap"; + base: "font=Sans font_size=10 align=left color=#ffff style=shadow,bottom shadow_color=#00000080 wrap=none text_class=notification_body"; + tag: "subject" "+ text_class=module_large style=glow color=#3399ffff glow_color=#3399ff18 align=center glow2_color=#3399ff12"; + tag: "body" "+ text_class=module_normal"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "b" "+ font=Sans:style=Bold text_class=module_bold"; + tag: "i" "+ font=Sans:style=Oblique text_class=module_italic"; + tag: "u" "+ underline=on underline_color=#3399ffff"; + tag: "img" ""; // images not supported + tag: "a" ""; // links not supported + } + style { name: "notification_style"; + base: "font=Sans font_size=10 align=left color=#ffff style=shadow,bottom shadow_color=#00000080 wrap=word text_class=notification_body"; + tag: "subject" "+ text_class=module_large style=glow color=#3399ffff glow_color=#3399ff18 align=center glow2_color=#3399ff12"; + tag: "body" "+ text_class=module_normal"; + tag: "br" "\n"; + tag: "ps" "ps"; + tag: "b" "+ font=Sans:style=Bold text_class=module_bold"; + tag: "i" "+ font=Sans:style=Oblique text_class=module_italic"; + tag: "u" "+ underline=on underline_color=#3399ffff"; + tag: "img" ""; // images not supported + tag: "a" ""; // links not supported + } + } + + parts { + part { name: "base"; + description { state: "default" 0.0; + image.normal: "darken_rounded_square.png"; + image.border: 15 15 15 15; + } + } + part { name: "titleclip"; type: RECT; + description { state: "default" 0.0; + rel2.to_x: "e.event.close"; + rel2.relative: 0.0 1.0; + } + } + part { name: "bodyclip"; type: RECT; + description { state: "default" 0.0; + rel2.offset: -13 -13; + min: 220 80; + } + } + part { name: "notification.swallow.app_icon"; type: SWALLOW; mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.5; + aspect: 1.0 1.0; + aspect_preference: BOTH; + rel1.offset: 12 12; + rel2.offset: 12 -13; + rel2.relative: 0.0 1.0; + min: 24 24; + } + } + part { name: "notification.textblock.message"; type: TEXTBLOCK; mouse_events: 0; + clip_to: "bodyclip"; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.to_x: "notification.swallow.app_icon"; + rel1.to_y: "notification.text.title"; + rel1.relative: 1.0 1.0; + rel1.offset: 4 4; + rel2.offset: -27 -13; + text { style: "notification_style"; + min: 0 1; + } + fixed: 1 1; + } + } + part { name: "message"; type: TEXTBLOCK; mouse_events: 0; + description { state: "default" 0.0; + align: 0.0 0.0; + max: 500 99999; + rel1.to_x: "notification.swallow.app_icon"; + rel1.to_y: "notification.text.title"; + rel1.relative: 1.0 1.0; + rel1.offset: 4 4; + rel2.offset: -27 -13; + text { style: "notification_style_nowrap"; + text_source: "notification.textblock.message"; + min: 0 1; + } + visible: 0; + } + } + part { name: "notification.text.title"; type: TEXT; mouse_events: 0; + clip_to: "titleclip"; + effect: SHADOW BOTTOM; + scale: 1; + description { state: "default" 0.0; + rel1.to_x: "notification.swallow.app_icon"; + rel1.relative: 1.0 0.0; + rel1.offset: 4 12; + rel2.relative: 0.0 0.0; + rel2.to_x: "e.event.close"; + rel2.offset: -5 12; + color: 255 255 255 255; + color3: 0 0 0 128; + align: 0.0 0.0; + color_class: "notification_title"; + text { font: "Sans:style=Bold"; size: 10; + text: "title goes here blah blah"; + min: 0 1; + align: 0.0 0.5; + text_class: "notification_title"; + } + fixed: 0 1; + } + } + part { name: "close"; + description { state: "default" 0.0; + image.normal: "sym_close_light_normal.png"; + rel1.to: "e.event.close"; + rel2.to: "e.event.close"; + min: 15 15; + max: 15 15; + fixed: 1 1; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + image.normal: "sym_close_light_selected.png"; + } + } + part { name: "e.event.close"; type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1.relative: 1.0 0.0; + rel1.offset: -13 12; + rel2.relative: 1.0 0.0; + rel2.offset: -13 12; + align: 1.0 0.0; + min: 15 15; + color: 0 0 0 0; + fixed: 1 1; + } + } + } + programs { + program { + signal: "mouse,down,1"; source: "e.event.close"; + action: STATE_SET "selected" 0.0; + target: "close"; + } + program { + signal: "mouse,up,1"; source: "e.event.close"; + action: STATE_SET "default" 0.0; + target: "close"; + } + program { + signal: "mouse,clicked,1"; source: "e.event.close"; + action: SIGNAL_EMIT "notification,close" "theme"; + } + program { + signal: "mouse,clicked,1"; source: "base"; + action: SIGNAL_EMIT "notification,find" "theme"; + } + program { + signal: "notification,new"; source: "notification"; + } + program { + signal: "notification,del"; source: "notification"; + } + } +} diff --git a/data/themes/img/glow_exclam.png b/data/themes/img/glow_exclam.png new file mode 100644 index 0000000000000000000000000000000000000000..088ccb8ce03541e99f131ef1f01af87b5285d26c GIT binary patch literal 2185 zcmV;42zK|0P)JvNH=ckSSmHVM1?DAy>uL`O zX$}b4U_fKsxW_Zy)mK4XZXp0SkCDk3 znSG5^2S|Odd!HX-#W^j~BC#M(yA7kAYVtqA`-$MDD$H?t-+(nHW2V65ms(=gg zZvJE!D-tv-u}OmN=je?C^yC!V7KCi8{CnUg;KtW+lLbkU;46>M7WkNU^ZOQS2E-x~ zt3VtN2$S#7G3aNY+kof?z)T)1e~jA$ulGpJk=l?{9a&zHwt@#pjaV17PHCj16{QV1 zp*kRpPuD@b6aXfC($VJh6ki;X0BNh_>3|}u7_`c+IR*kbfI%(FB6ZB0f<1@jk+bz|orI5yFS+c;6g1R2Zi%Lv6^?0m(SvW=AVJZ|DVXQwH5U?qYoTD$Wl` zVoq+t$SFsryeaU(a~$piQ{HsSkqM)illz9Gd=*z6bSt~5K5irWtVVqg8MU~?;VqDb zz$h3;Ccm!y+AJRg<0u417RVBZAGNqgNv}(aCNIW`Zy^(qYuAxkgVO|`c{243ym0^= zULouqdf`A*1{q|H!-s&oHbN$+$fhK6ebPXEj>HVf6ekhy9H~LEfh!fxkxIm8ii;Ui zpCi1xxh|UnSp6g}5p582h!;cz!3bB-K8SQO=DIoJvVTeA*m8)+VgNG&LVbnQS(_1J z=w!G3|KCl8cQ5%o*zWYhvBkstrBNt7S)l;){pO^gAJ9?i$=ieJ4J z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