[gnome-themes-standard/wip/jimmac/updated-gtk2: 57/106] Tab update.
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard/wip/jimmac/updated-gtk2: 57/106] Tab update.
- Date: Thu, 3 Mar 2016 22:22:05 +0000 (UTC)
commit 53ee00bc48e6ee123b0c2430488a503d9693a7c9
Author: Juraj Fiala <doctorjellyface riseup net>
Date: Fri Feb 12 18:47:53 2016 +0100
Tab update.
Unfortunately tabs aren't really configurable in GTK2, and even the
configuration options that are there are buggy, so this update is
limited in both appearance and functionality.
themes/Adwaita/gtk-2.0/assets.svg | 118 +++++++++++++++-
themes/Adwaita/gtk-2.0/assets.txt | 5 +
themes/Adwaita/gtk-2.0/assets/null.png | Bin 0 -> 142 bytes
themes/Adwaita/gtk-2.0/assets/tab-down-active.png | Bin 0 -> 170 bytes
themes/Adwaita/gtk-2.0/assets/tab-left-active.png | Bin 0 -> 179 bytes
themes/Adwaita/gtk-2.0/assets/tab-right-active.png | Bin 0 -> 171 bytes
themes/Adwaita/gtk-2.0/assets/tab-up-active.png | Bin 0 -> 167 bytes
themes/Adwaita/gtk-2.0/main.rc | 148 ++++++++------------
8 files changed, 180 insertions(+), 91 deletions(-)
---
diff --git a/themes/Adwaita/gtk-2.0/assets.svg b/themes/Adwaita/gtk-2.0/assets.svg
index bc0cbd2..065722f 100644
--- a/themes/Adwaita/gtk-2.0/assets.svg
+++ b/themes/Adwaita/gtk-2.0/assets.svg
@@ -1605,9 +1605,9 @@
borderopacity="1"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:zoom="7.9999995"
- inkscape:cx="319.54786"
- inkscape:cy="366.5909"
+ inkscape:zoom="31.999998"
+ inkscape:cx="216.40638"
+ inkscape:cy="460.95856"
inkscape:current-layer="layer1"
inkscape:document-units="px"
showgrid="false"
@@ -5907,5 +5907,117 @@
x="312.4808"
y="107.21632" />
</g>
+ <g
+ id="tab-up-active"
+ inkscape:label="#g5146"
+ transform="translate(4,0)">
+ <rect
+
style="opacity:1;fill:#ffffff;fill-opacity:0.5;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5140"
+ width="3"
+ height="4"
+ x="10"
+ y="230" />
+ <rect
+ y="230.5"
+ x="10.5"
+ height="3"
+ width="2"
+ id="rect5144"
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#9d9d99;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ <rect
+ y="232.00006"
+ x="10"
+ height="2"
+ width="3"
+ id="rect5142"
+
style="opacity:1;fill:#4a90d9;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ </g>
+ <g
+ transform="matrix(0,1,-1,0,241,220)"
+ inkscape:label="#g5146"
+ id="tab-right-active">
+ <rect
+ y="230"
+ x="10"
+ height="4"
+ width="3"
+ id="rect5174"
+
style="opacity:1;fill:#ffffff;fill-opacity:0.5;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ <rect
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#9d9d99;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5178"
+ width="2"
+ height="3"
+ x="10.5"
+ y="230.5" />
+ <rect
+
style="opacity:1;fill:#4a90d9;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5180"
+ width="3"
+ height="2"
+ x="10"
+ y="232" />
+ </g>
+ <g
+ transform="matrix(1,0,0,-1,4,457)"
+ inkscape:label="#g5146"
+ id="tab-down-active">
+ <rect
+ y="230"
+ x="10"
+ height="4"
+ width="3"
+ id="rect5192"
+
style="opacity:1;fill:#ffffff;fill-opacity:0.5;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ <rect
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#9d9d99;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5196"
+ width="2"
+ height="3"
+ x="10.5"
+ y="230.5" />
+ <rect
+
style="opacity:1;fill:#4a90d9;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5198"
+ width="3"
+ height="2"
+ x="10"
+ y="232" />
+ </g>
+ <g
+ id="tab-left-active"
+ inkscape:label="#g5146"
+ transform="matrix(0,1,1,0,-222,214)">
+ <rect
+
style="opacity:1;fill:#ffffff;fill-opacity:0.5;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect5210"
+ width="3"
+ height="4"
+ x="10"
+ y="230" />
+ <rect
+ y="230.5"
+ x="10.5"
+ height="3"
+ width="2"
+ id="rect5214"
+
style="opacity:1;fill:none;fill-opacity:1;stroke:#9d9d99;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ <rect
+ y="232"
+ x="10"
+ height="2"
+ width="3"
+ id="rect5216"
+
style="opacity:1;fill:#4a90d9;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
+ </g>
+ <rect
+
style="opacity:1;fill:#ffffff;fill-opacity:0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="null"
+ width="1"
+ height="1"
+ x="213"
+ y="17"
+ inkscape:label="#rect4938" />
</g>
</svg>
diff --git a/themes/Adwaita/gtk-2.0/assets.txt b/themes/Adwaita/gtk-2.0/assets.txt
index bf833c1..1e565ae 100644
--- a/themes/Adwaita/gtk-2.0/assets.txt
+++ b/themes/Adwaita/gtk-2.0/assets.txt
@@ -76,6 +76,7 @@ focus
separator-treeview
menu-border
menubar-item-active
+null
progressbar-horz
progressbar-horz-trough
progressbar-vert
@@ -113,3 +114,7 @@ scale-horz-trough
scale-horz-trough-active
scale-vert-trough
scale-vert-trough-active
+tab-left-active
+tab-right-active
+tab-up-active
+tab-down-active
diff --git a/themes/Adwaita/gtk-2.0/assets/null.png b/themes/Adwaita/gtk-2.0/assets/null.png
new file mode 100644
index 0000000..34ffd39
Binary files /dev/null and b/themes/Adwaita/gtk-2.0/assets/null.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
new file mode 100644
index 0000000..6dc0385
Binary files /dev/null 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
new file mode 100644
index 0000000..2e2c5ae
Binary files /dev/null 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
new file mode 100644
index 0000000..70e8dfc
Binary files /dev/null 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
new file mode 100644
index 0000000..8d406e7
Binary files /dev/null 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 cf02d93..570884c 100644
--- a/themes/Adwaita/gtk-2.0/main.rc
+++ b/themes/Adwaita/gtk-2.0/main.rc
@@ -87,6 +87,8 @@ style "default" {
GtkExpander::expander-size = 11
+ GtkNotebook::tab-overlap = -8
+
##########
# Colors #
##########
@@ -1194,10 +1196,6 @@ style "entry" {
}
-style "notebook_tab_label" {
- #fg[ACTIVE] = @text_color
-}
-
style "combobox_entry" {
engine "pixmap" {
@@ -1638,126 +1636,91 @@ style "notebook" {
engine "pixmap" {
- image {
- function = EXTENSION
- state = ACTIVE
- file = "Tabs/tab-bottom.png"
- border = {3,3,3,5}
- stretch = TRUE
- gap_side = TOP
- }
+ # Inactive tabs are drawn with ACTIVE for some reason
+
+ # Left
image {
function = EXTENSION
state = ACTIVE
- file = "Tabs/tab-top.png"
- border = {3,3,5,3}
- stretch = TRUE
- gap_side = BOTTOM
+ file = "assets/null.png"
+ gap_side = RIGHT
}
image {
function = EXTENSION
- state = ACTIVE
- file = "Tabs/tab-left.png"
- border = {3,3,3,3}
+ file = "assets/tab-left-active.png"
+ border = {1, 2, 1, 1}
stretch = TRUE
gap_side = RIGHT
}
+ # Right
+
image {
function = EXTENSION
state = ACTIVE
- file = "Tabs/tab-right.png"
- border = {3,3,3,3}
- stretch = TRUE
+ file = "assets/null.png"
gap_side = LEFT
}
image {
function = EXTENSION
- file = "Tabs/tab-top-active.png"
- border = {3,3,3,3}
+ file = "assets/tab-right-active.png"
+ border = {2, 1, 1, 1}
stretch = TRUE
- gap_side = BOTTOM
+ gap_side = LEFT
}
- image {
- function = EXTENSION
- file = "Tabs/tab-bottom-active.png"
- border = {3,3,3,3}
- stretch = TRUE
- gap_side = TOP
- }
+ # Up
image {
- function = EXTENSION
- file = "Tabs/tab-left-active.png"
- border = { 3,3,3,3}
- stretch = TRUE
- gap_side = RIGHT
+ function = EXTENSION
+ state = ACTIVE
+ file = "assets/null.png"
+ gap_side = BOTTOM
}
image {
function = EXTENSION
- file = "Tabs/tab-right-active.png"
- border = { 3,3,3,3}
+ file = "assets/tab-up-active.png"
+ border = {1, 1, 1, 2}
stretch = TRUE
- gap_side = LEFT
+ gap_side = BOTTOM
}
- ############################################
- # How to draw boxes with a gap on one side # (ie the page of a notebook)
- ############################################
+ # Down
image {
- function = BOX_GAP
- file = "assets/frame-notebook.png"
- border = {1, 1, 1, 1}
- stretch = TRUE
- gap_file = "Tabs/notebook-gap-horiz.png"
- gap_border = {1, 1, 0, 0}
- gap_side = TOP
+ function = EXTENSION
+ state = ACTIVE
+ file = "assets/null.png"
+ gap_side = TOP
}
image {
- function = BOX_GAP
- file = "assets/frame-notebook.png"
- border = {1, 1, 1, 1}
- stretch = TRUE
- gap_file = "Tabs/notebook-gap-horiz.png"
- gap_border = {1, 1, 0, 0}
- gap_side = BOTTOM
+ function = EXTENSION
+ file = "assets/tab-down-active.png"
+ border = {1, 1, 2, 1}
+ stretch = TRUE
+ gap_side = TOP
}
- image {
- function = BOX_GAP
- file = "Tabs/notebook.png"
- border = {4, 4, 4, 4}
- stretch = TRUE
- gap_file = "Tabs/notebook-gap-vert.png"
- gap_border = {0, 0, 1, 1}
- gap_side = LEFT
- }
+ # Draw the inner frame
image {
- function = BOX_GAP
- file = "Tabs/notebook.png"
- border = {4, 4, 4, 4}
- stretch = TRUE
- gap_file = "Tabs/notebook-gap-vert.png"
- gap_border = {0, 0, 1, 1}
- gap_side = RIGHT
+ function = BOX_GAP
+ file = "assets/frame-notebook.png"
+ border = {1, 1, 1, 1}
+ stretch = TRUE
}
- #####################################################################
- # How to draw the box of a notebook when it isn't attached to a tab #
- #####################################################################
+ # Standalone frame
image {
function = BOX
- file = "Tabs/notebook.png"
- border = {4, 4, 4, 4}
+ file = "assets/frame-notebook.png"
+ border = {1, 1, 1, 1}
stretch = TRUE
}
@@ -1765,6 +1728,23 @@ style "notebook" {
}
+style "notebook_tab_label" {
+
+ font_name = "Bold"
+ # Again, ACTIVE is actually inactive
+ fg[ACTIVE] = mix(0.5, @fg_color, @bg_color)
+
+}
+
+style "notebook_viewport" {
+ bg[NORMAL] = @base_color
+}
+
+style "notebook_prelight" {
+ bg[PRELIGHT] = @base_color
+}
+
+
style "handlebox" {
engine "pixmap" {
@@ -2229,14 +2209,6 @@ style "inline_toolbar" {
}
-style "notebook_viewport" {
- bg[NORMAL] = @base_color
-}
-
-style "notebook_prelight" {
- bg[PRELIGHT] = @base_color
-}
-
style "separator" {
engine "pixmap" {
@@ -2319,13 +2291,13 @@ widget_class "*<GtkNotebook>*<GtkScrolledWindow>*<GtkViewport>" style "notebook
widget_class "*<GtkToolbar>*<GtkButton>" style "toolbar_button"
# We need the prelight colour inside notebooks to be white so it won't change on hover
-widget_class "*<GtkNotebook>*" style "notebook_prelight"
+widget_class "*<GtkNotebook>*" style "notebook_prelight"
#widget_class "*<GtkNotebook>*<GtkComboBoxEntry>*<GtkEntry>" style "notebook_combobox_entry"
widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkComboBoxEntry>*<GtkEntry>" style "combobox_entry"
# We also need to avoid changing fg color for the inactive notebook tab labels
-widget_class "*<GtkNotebook>.<GtkLabel>" style "notebook_tab_label"
+widget_class "*<GtkNotebook>.<GtkLabel>" style "notebook_tab_label"
# ComboBoxes tend to draw the button label with text[] instead of fg[], we need to fix that
widget_class "*<GtkComboBox>*<GtkCellView>" style "combobox_cellview"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]