From 1b5c6fc8bd0402c3fba41407c83fd8163c38d871 Mon Sep 17 00:00:00 2001 From: Juraj Fiala Date: Thu, 3 Mar 2016 20:08:42 +0100 Subject: Fixed widgets in notebooks. --- themes/Adwaita/gtk-2.0/assets.svg | 856 +++++++++++++++------ themes/Adwaita/gtk-2.0/assets.txt | 9 + .../assets/combo-entry-ltr-entry-active.png | Bin 300 -> 280 bytes .../assets/combo-entry-ltr-entry-insensitive.png | Bin 256 -> 236 bytes .../gtk-2.0/assets/combo-entry-ltr-entry.png | Bin 317 -> 291 bytes themes/Adwaita/gtk-2.0/assets/entry-active.png | Bin 369 -> 330 bytes .../Adwaita/gtk-2.0/assets/entry-insensitive.png | Bin 288 -> 256 bytes themes/Adwaita/gtk-2.0/assets/entry.png | Bin 360 -> 319 bytes .../notebook-combo-entry-ltr-entry-active.png | Bin 0 -> 237 bytes .../notebook-combo-entry-ltr-entry-insensitive.png | Bin 0 -> 236 bytes .../assets/notebook-combo-entry-ltr-entry.png | Bin 0 -> 286 bytes .../notebook-combo-entry-rtl-entry-active.png | Bin 0 -> 237 bytes .../notebook-combo-entry-rtl-entry-insensitive.png | Bin 0 -> 231 bytes .../assets/notebook-combo-entry-rtl-entry.png | Bin 0 -> 283 bytes .../gtk-2.0/assets/notebook-entry-active.png | Bin 0 -> 330 bytes .../gtk-2.0/assets/notebook-entry-insensitive.png | Bin 0 -> 256 bytes themes/Adwaita/gtk-2.0/assets/notebook-entry.png | Bin 0 -> 318 bytes themes/Adwaita/gtk-2.0/assets/tab-down-active.png | Bin 233 -> 238 bytes themes/Adwaita/gtk-2.0/assets/tab-left-active.png | Bin 233 -> 235 bytes themes/Adwaita/gtk-2.0/assets/tab-right-active.png | Bin 228 -> 236 bytes themes/Adwaita/gtk-2.0/assets/tab-up-active.png | Bin 232 -> 234 bytes themes/Adwaita/gtk-2.0/main.rc | 230 +++++- 22 files changed, 822 insertions(+), 273 deletions(-) create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-active.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-insensitive.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-active.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-insensitive.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-entry-active.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-entry-insensitive.png create mode 100644 themes/Adwaita/gtk-2.0/assets/notebook-entry.png (limited to 'themes') diff --git a/themes/Adwaita/gtk-2.0/assets.svg b/themes/Adwaita/gtk-2.0/assets.svg index b4d3f832..a321e5cb 100644 --- a/themes/Adwaita/gtk-2.0/assets.svg +++ b/themes/Adwaita/gtk-2.0/assets.svg @@ -159,7 +159,7 @@ xlink:href="#linearGradient6819" id="linearGradient6913" gradientUnits="userSpaceOnUse" - gradientTransform="translate(37,6)" + gradientTransform="translate(50,-30)" x1="5" y1="109.80856" x2="5" @@ -596,17 +596,66 @@ y1="109.80856" x2="5" y2="82.123726" /> - - - + + + + + + + inkscape:snap-to-guides="true" + inkscape:snap-others="false"> @@ -653,7 +703,7 @@ image/svg+xml - + @@ -661,6 +711,14 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> + - + transform="translate(3,-36)"> + - @@ -733,7 +782,16 @@ + transform="translate(50,50)"> + - + transform="translate(-12,3)"> + transform="translate(-7,3)"> + transform="translate(-43,230)"> + transform="translate(-11,230)"> + transform="translate(49,230)"> + transform="translate(-41,220.5)"> @@ -2116,7 +2165,7 @@ + transform="translate(-181.5,175.5)"> + transform="translate(-181.5,175.5)"> + transform="translate(-189,176)"> + transform="translate(-189,176)"> + inkscape:label="#g5239"> + - + transform="translate(50,-30)"> + transform="translate(3,-35)"> - + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#e8e8e7;stroke:none;stroke-width:2;marker:none;enable-background:accumulate;fill-opacity:1" /> + @@ -2479,7 +2527,7 @@ + transform="translate(23,-35)"> - + @@ -2523,7 +2571,7 @@ + transform="translate(3,-35)"> @@ -2559,7 +2607,7 @@ + transform="translate(3,-35)"> + transform="translate(3,-35)"> + transform="translate(3,-35)"> + transform="translate(3,-35)"> + - + transform="translate(63,-35)"> - + @@ -2732,7 +2780,7 @@ + transform="matrix(-1,0,0,1,133,-35)"> + transform="matrix(-1,0,0,1,133,-35)"> @@ -2856,7 +2904,7 @@ + transform="matrix(-1,0,0,1,213,-35)"> + transform="matrix(-1,0,0,1,253,-35)"> + transform="matrix(-1,0,0,1,173,-35)"> + transform="matrix(-1,0,0,1,213,-35)"> - + style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:2;marker:none;enable-background:accumulate;fill-opacity:1" /> + @@ -3555,7 +3603,8 @@ + id="g5272" + transform="translate(3,0)"> - + @@ -3600,7 +3649,7 @@ id="spin-ltr-up" clip-path="url(#clipPath5125)" inkscape:label="#g5065" - transform="translate(-2,0)"> + transform="translate(1,0)"> @@ -3693,7 +3742,8 @@ + inkscape:label="#g5130" + transform="translate(3,0)"> + transform="translate(43,0)"> - + @@ -3830,7 +3880,7 @@ @@ -4002,7 +4052,7 @@ @@ -4673,28 +4723,17 @@ id="rect3336-4-2" style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#9d9d99;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new" /> - - - - + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssssc" + inkscape:label="#rect4838" /> + inkscape:label="#g5413" + transform="translate(-9.992186,-5.9921706)"> - - - - - + - - - - + - - - + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssssc" + inkscape:label="#path4843" /> + transform="matrix(0,1,-1,0,201,-186.00002)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/Adwaita/gtk-2.0/assets.txt b/themes/Adwaita/gtk-2.0/assets.txt index 577d4b8e..cdb7ba82 100644 --- a/themes/Adwaita/gtk-2.0/assets.txt +++ b/themes/Adwaita/gtk-2.0/assets.txt @@ -60,6 +60,15 @@ handle-horz handle-vert menu-border menubar-item-active +notebook-entry +notebook-entry-active +notebook-entry-insensitive +notebook-combo-entry-ltr-entry +notebook-combo-entry-ltr-entry-active +notebook-combo-entry-ltr-entry-insensitive +notebook-combo-entry-rtl-entry +notebook-combo-entry-rtl-entry-active +notebook-combo-entry-rtl-entry-insensitive pan-left pan-left-semi pan-left-insensitive diff --git a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-active.png b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-active.png index b363e82c..d6ab4444 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-active.png and b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-insensitive.png b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-insensitive.png index f5e69604..2d045802 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-insensitive.png and b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry-insensitive.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry.png b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry.png index 9dae7e37..a1dab155 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry.png and b/themes/Adwaita/gtk-2.0/assets/combo-entry-ltr-entry.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/entry-active.png b/themes/Adwaita/gtk-2.0/assets/entry-active.png index e82ad19c..4c91920c 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/entry-active.png and b/themes/Adwaita/gtk-2.0/assets/entry-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/entry-insensitive.png b/themes/Adwaita/gtk-2.0/assets/entry-insensitive.png index b111c667..00dadf4b 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/entry-insensitive.png and b/themes/Adwaita/gtk-2.0/assets/entry-insensitive.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/entry.png b/themes/Adwaita/gtk-2.0/assets/entry.png index a1eca288..19dd2558 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/entry.png and b/themes/Adwaita/gtk-2.0/assets/entry.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-active.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-active.png new file mode 100644 index 00000000..ef05a807 Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-insensitive.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-insensitive.png new file mode 100644 index 00000000..f93daafc Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry-insensitive.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry.png new file mode 100644 index 00000000..a179b6af Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-ltr-entry.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-active.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-active.png new file mode 100644 index 00000000..0c9e5850 Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-insensitive.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-insensitive.png new file mode 100644 index 00000000..955bfc73 Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry-insensitive.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry.png b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry.png new file mode 100644 index 00000000..86a77dbf Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-combo-entry-rtl-entry.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-entry-active.png b/themes/Adwaita/gtk-2.0/assets/notebook-entry-active.png new file mode 100644 index 00000000..5c2511c3 Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-entry-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-entry-insensitive.png b/themes/Adwaita/gtk-2.0/assets/notebook-entry-insensitive.png new file mode 100644 index 00000000..8b0a2f4e Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-entry-insensitive.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/notebook-entry.png b/themes/Adwaita/gtk-2.0/assets/notebook-entry.png new file mode 100644 index 00000000..f0e3c1f8 Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/notebook-entry.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/tab-down-active.png b/themes/Adwaita/gtk-2.0/assets/tab-down-active.png index a755c61d..c003b63f 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/tab-down-active.png and b/themes/Adwaita/gtk-2.0/assets/tab-down-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/tab-left-active.png b/themes/Adwaita/gtk-2.0/assets/tab-left-active.png index 80dc99fd..57c6a4dc 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/tab-left-active.png and b/themes/Adwaita/gtk-2.0/assets/tab-left-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/tab-right-active.png b/themes/Adwaita/gtk-2.0/assets/tab-right-active.png index bd514f73..f59f7fad 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/tab-right-active.png and b/themes/Adwaita/gtk-2.0/assets/tab-right-active.png differ diff --git a/themes/Adwaita/gtk-2.0/assets/tab-up-active.png b/themes/Adwaita/gtk-2.0/assets/tab-up-active.png index 18a07ade..6fec2d55 100644 Binary files a/themes/Adwaita/gtk-2.0/assets/tab-up-active.png and b/themes/Adwaita/gtk-2.0/assets/tab-up-active.png differ diff --git a/themes/Adwaita/gtk-2.0/main.rc b/themes/Adwaita/gtk-2.0/main.rc index 1c49fb9d..092a6597 100644 --- a/themes/Adwaita/gtk-2.0/main.rc +++ b/themes/Adwaita/gtk-2.0/main.rc @@ -124,7 +124,7 @@ style "default" { base[NORMAL] = @base_color base[PRELIGHT] = shade (0.95, @bg_color) base[SELECTED] = @selected_bg_color - base[INSENSITIVE] = @bg_color + base[INSENSITIVE] = mix (0.5, @fg_color, @bg_color) base[ACTIVE] = @selected_bg_color # For succinctness, all reasonable pixmap options remain here @@ -1189,14 +1189,6 @@ style "default" { # Entries # ########### - image { - function = SHADOW - state = NORMAL - detail = "entry" - file = "assets/entry.png" - border = {4, 4, 4, 4} - stretch = TRUE - } image { function = SHADOW @@ -1217,10 +1209,11 @@ style "default" { } image { - function = FLAT_BOX - state = NORMAL - detail = "entry_bg" - file = "assets/entry-background.png" + function = SHADOW + detail = "entry" + file = "assets/entry.png" + border = {4, 4, 4, 4} + stretch = TRUE } image { @@ -1237,6 +1230,11 @@ style "default" { file = "assets/entry-background-insensitive.png" } + image { + function = FLAT_BOX + detail = "entry_bg" + file = "assets/entry-background.png" + } ######### # Spins # ######### @@ -1841,16 +1839,9 @@ style "entry" { # We set this same as the border of the border of the entry # This way there's no overlap - # TODO: find out what actually sets the size of the border xthickness = 4 ythickness = 4 - # The background of the entry cannot be drawn transparent - # This is going to be drawn on bg so we set it to bg - # This way it looks like one piece - base[NORMAL] = @bg_color - base[INSENSITIVE] = @bg_color - } style "combobox" { @@ -1871,7 +1862,7 @@ style "combobox_cellview" { style "combobox_entry" { # Since one side of the button is missing, we need to shift the arrow a little to the right - GtkButton::inner-border = {6, 8, 4, 4} + GtkButton::inner-border = {0, 1, 0, 0} engine "pixmap" { @@ -2031,16 +2022,16 @@ style "combobox_entry" { direction = RTL } - } } -style "combobox_button_padding" { +style "combo_button_padding" { # Since one side of the button is missing, we need to shift the arrow a little to the right - # This is the same thing we've done above but the combobox uses padding diffrerently than the combo - GtkButton::inner-border = {0, 1, 0, 0} + # This is the same thing we've done above but the combo, unlike the combobox, + # uses padding the same way as a button + GtkButton::inner-border = {6, 8, 4, 4} } @@ -2055,8 +2046,160 @@ style "notebook_viewport" { bg[NORMAL] = @base_color } -style "notebook_prelight" { - bg[PRELIGHT] = @base_color +style "notebook_bg" { + bg[NORMAL] = @base_color + bg[PRELIGHT] = @base_color + bg[INSENSITIVE] = @base_color +} + +style "notebook_entry" { + + engine "pixmap" { + + image { + function = SHADOW + state = ACTIVE + detail = "entry" + file = "assets/notebook-entry-active.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + + image { + function = SHADOW + state = INSENSITIVE + detail = "entry" + file = "assets/notebook-entry-insensitive.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + + image { + function = SHADOW + detail = "entry" + file = "assets/notebook-entry.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + } +} + +style "normal_bg" { + bg[NORMAL] = @bg_color + bg[PRELIGHT] = @bg_color + bg[INSENSITIVE] = mix (0.6, @bg_color, @base_color) +} + +style "normal_entry" { + + engine "pixmap" { + + image { + function = SHADOW + state = ACTIVE + detail = "entry" + file = "assets/entry-active.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + + image { + function = SHADOW + state = INSENSITIVE + detail = "entry" + file = "assets/entry-insensitive.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + + image { + function = SHADOW + detail = "entry" + file = "assets/entry.png" + border = {4, 4, 4, 4} + stretch = TRUE + } + } +} + +style "notebook_combo" { + + engine "pixmap" { + + ############# + # LTR entry # + ############# + + image { + function = SHADOW + state = NORMAL + detail = "entry" + file = "assets/notebook-combo-entry-ltr-entry.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = LTR + } + + image { + function = SHADOW + state = ACTIVE + detail = "entry" + file = "assets/notebook-combo-entry-ltr-entry-active.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = LTR + } + + image { + function = SHADOW + state = INSENSITIVE + detail = "entry" + file = "assets/notebook-combo-entry-ltr-entry-insensitive.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = LTR + } + + ############# + # RTL entry # + ############# + + image { + function = SHADOW + state = NORMAL + detail = "entry" + file = "assets/notebook-combo-entry-rtl-entry.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = RTL + } + + image { + function = SHADOW + state = ACTIVE + detail = "entry" + file = "assets/notebook-combo-entry-rtl-entry-active.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = RTL + } + + image { + function = SHADOW + state = INSENSITIVE + detail = "entry" + file = "assets/notebook-combo-entry-rtl-entry-insensitive.png" + border = {4, 4, 4, 4} + stretch = TRUE + direction = RTL + } + + } + +} + +style "textview" { + bg[NORMAL] = @base_color } style "scale_horz" { @@ -2330,7 +2473,7 @@ style "disable_separator" { # Default style, containing most of the stuff class "GtkWidget" style "default" -# Override padding, style and colour +# Override padding, style and colour class "GtkButton" style "button" class "GtkLinkButton" style "link_button" class "GtkEntry" style "entry" @@ -2344,6 +2487,7 @@ class "GtkFrame" style "frame" class "GtkSeparatorToolItem" style "toolbar_separator" class "GtkMenuBar" style "menubar" class "GtkMenu" style "menu" +class "GtkTextView" style "textview" # Menu and menubar items widget_class "**" style "menu_item" @@ -2361,10 +2505,6 @@ widget_class "***" style "treeview_header" # Give the file chooser toolbar a border widget_class "**" style "inline_toolbar" -# TODO: find out why this is needed -# It only sets the bg color to base -widget_class "***" style "notebook_viewport" - # Fix padding on regular comboboxes widget_class "*." style "combobox" # And disable separators on them @@ -2372,11 +2512,11 @@ widget_class "*.*" style "disable_separato # Join together the ComboBoxEntry entry and button widget_class "**" style "combobox_entry" -# Tweak the padding on the button a little bit because it uses it a bit differently -widget_class "*." style "combobox_button_padding" # Join the Combo entry and button widget_class "**" style "combobox_entry" +# Tweak the padding on the button a little bit because it uses it a bit differently +widget_class "*." style "combo_button_padding" # Alas we cannot do the same for ComboBoxText because there isn't a way to apply the style to only # the comboboxes that have an entry inside @@ -2384,11 +2524,23 @@ widget_class "**" style "combobox_entry" # Toolbar buttons have different paddings widget_class "**" style "toolbar_button" -# We need the prelight colour inside notebooks to be white so it won't change on hover -widget_class "**" style "notebook_prelight" - -#widget_class "***" style "notebook_combobox_entry" -widget_class "****" style "combobox_entry" +# Notebooks are white, act accordingly +widget_class "**" style "notebook_entry" +widget_class "**" style "notebook_bg" +widget_class "**" style "notebook_bg" +widget_class "***" style "notebook_bg" +widget_class "**" style "notebook_bg" +widget_class "*.*" style "notebook_bg" +widget_class "***" style "notebook_combo" +widget_class "***" style "notebook_combo" + +# However, stuff inside eventboxes inside notebooks is grey again, react +widget_class "***" style "normal_entry" +widget_class "***" style "normal_bg" +widget_class "***" style "normal_bg" +widget_class "****" style "combobox_entry" +widget_class "****" style "combobox_entry" +widget_class "***." style "combo_button_padding" # ComboBoxes tend to draw the button label with text[] instead of fg[], we need to fix that widget_class "**" style "combobox_cellview" -- cgit v1.2.1