From 1d4957dddcbf98c3a985186b8b61be2b3f004b3c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 6 Sep 2013 10:40:59 +0200 Subject: switch from old RC to CSS for diskdrake colors were converted with bc: obase=16 *255 --- perl-install/diskdrake/hd_gtk.pm | 10 ++++--- perl-install/share/diskdrake.css | 63 ++++++++++++++++++++++++++++++++++++++ perl-install/share/diskdrake.rc | 65 ---------------------------------------- 3 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 perl-install/share/diskdrake.css delete mode 100644 perl-install/share/diskdrake.rc diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index fa52a3e57..80334ddab 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -45,10 +45,12 @@ notebook current_kind[] =cut sub load_theme() { - my $rc = "/usr/share/libDrakX/diskdrake.rc"; - -r $rc or $rc = dirname(__FILE__) . "/../diskdrake.rc"; - -r $rc or $rc = dirname(__FILE__) . "/../share/diskdrake.rc"; - Gtk3::Rc->parse($rc); + my $css = "/usr/share/libDrakX/diskdrake.css"; + -r $css or $css = dirname(__FILE__) . "/../diskdrake.css"; + -r $css or $css = dirname(__FILE__) . "/../share/diskdrake.css"; + my $pl = Gtk3::CssProvider->new; + $pl->load_from_path($css); + my $cx = Gtk3::StyleContext::add_provider_for_screen(Gtk3::Gdk::Screen::get_default(), $pl, Gtk3::STYLE_PROVIDER_PRIORITY_APPLICATION); } sub main { diff --git a/perl-install/share/diskdrake.css b/perl-install/share/diskdrake.css new file mode 100644 index 000000000..02e040157 --- /dev/null +++ b/perl-install/share/diskdrake.css @@ -0,0 +1,63 @@ +/* FIXME: to be inherited by all other styles */ +#PART* { + /* FIXME: replace by appropriate font: + fontset = "-*-*-medium-r-normal-*-8-*-*-*-*-*-iso8859-1,*-r-*" + => font: "8" */ + padding: 1; +} + +#PART_ext2, #PART_ext3, #PART_ext4 { + background-color: #ff0000; +} +#PART_ext2:hover:hover, #PART_ext3:hover, #PART_ext4:hover { + background-color: #e60000; +} +#PART_ext2:active:active, #PART_ext3:active, #PART_ext4:active { + background-color: #e60000; +} + +#PART_xfs { + background-color: #ff9900; +} +#PART_xfs:hover { + background-color: #e66600; +} +#PART_xfs:active { + background-color: #e69900; +} + +#PART_swap { + background-color: #66cc00; + color: #000000; +} +#PART_swap:active, #PART_swap:hover { + background-color: #66b700; +} + +#PART_vfat, #PART_ntfs, #PART_ntfs-3g { + background-color: #00b7ff; +} +#PART_vfat:hover, #PART_ntfs:hover, #PART_ntfs-3g:hover { + background-color: #0099e6; +} +#PART_vfat:active, #PART_ntfs:active, #PART_ntfs-3g:active { + background-color: #0099e6; +} + +#PART_empty { + background-color: #ffffff; + color: #000000; +} +#PART_empty:hover, #PART_empty:active { + background-color: #e6e6e6; +} + +#PART_other { + background-color: #929eab; + color: #000000; +} + +#PART_new { + background-color: #1f429c; + color: #ffffff; +} diff --git a/perl-install/share/diskdrake.rc b/perl-install/share/diskdrake.rc deleted file mode 100644 index c519fecf0..000000000 --- a/perl-install/share/diskdrake.rc +++ /dev/null @@ -1,65 +0,0 @@ -gtk-button-images=1 -style "font" -{ - fontset = "-*-*-medium-r-normal-*-8-*-*-*-*-*-iso8859-1,*-r-*" - xthickness = 1 - ythickness = 1 -} - -style "red" = "font" -{ - bg[NORMAL] = { 1.0, 0, 0 } - bg[ACTIVE] = { 0.9, 0, 0 } - bg[PRELIGHT] = { 0.9, 0, 0 } -} -style "orange" = "font" -{ - bg[NORMAL] = { 1.0, 0.6, 0 } - bg[ACTIVE] = { 0.9, 0.6, 0 } - bg[PRELIGHT] = { 0.9, 0.4, 0 } -} -style "green" = "font" -{ - bg[NORMAL] = { 0.4, 0.8, 0 } - bg[ACTIVE] = { 0.4, 0.7, 0 } - bg[PRELIGHT] = { 0.4, 0.7, 0 } - fg[NORMAL] = { 0, 0, 0 } -} -style "blue" = "font" -{ - bg[NORMAL] = { 0, 0.7, 1.0 } - bg[ACTIVE] = { 0, 0.6, 0.9 } - bg[PRELIGHT] = { 0, 0.6, 0.9 } -} -style "white" = "font" -{ - bg[NORMAL] = { 1.0, 1.0, 1.0 } - bg[ACTIVE] = { 0.9, 0.9, 0.9 } - bg[PRELIGHT] = { 0.9, 0.9, 0.9 } - fg[NORMAL] = { 0, 0, 0 } -} -style "gray" = "font" -{ - bg[NORMAL] = { 0.57, 0.62, 0.67 } - bg[ACTIVE] = { 0.57, 0.62, 0.57 } - bg[PRELIGHT] = { 0.57, 0.62, 0.57 } - fg[NORMAL] = { 0, 0, 0 } -} -style "darkblue" = "font" -{ - bg[NORMAL] = { 0.12, 0.26, 0.61 } - bg[ACTIVE] = { 0.12, 0.26, 0.61 } - bg[PRELIGHT] = { 0.12, 0.26, 0.61 } - fg[NORMAL] = { 1, 1, 1 } -} - -widget "*PART_ext2" style "red" -widget "*PART_ext3" style "red" -widget "*PART_ext4" style "red" -widget "*PART_xfs" style "orange" -widget "*PART_swap" style "green" -widget "*PART_vfat" style "blue" -widget "*PART_ntfs*" style "blue" -widget "*PART_empty" style "white" -widget "*PART_other" style "gray" -widget "*PART_new" style "darkblue" -- cgit v1.2.1