[longomatch] Add an outline focus to square buttons
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add an outline focus to square buttons
- Date: Tue, 28 Oct 2014 09:53:05 +0000 (UTC)
commit 0762493ffeb5dd6ed5bb514245c14a502f4a2b3b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Oct 23 16:41:24 2014 +0200
Add an outline focus to square buttons
data/theme/Makefile.am | 2 +
data/theme/gtk-2.0/Buttons/button-square-focus.svg | 18 ++++++++++
data/theme/gtk-2.0/Buttons/null.png | Bin 0 -> 325 bytes
data/theme/gtk-2.0/buttons.rc | 34 ++++++++++++++++++++
data/theme/gtk-2.0/gtkrc | 9 ++---
5 files changed, 58 insertions(+), 5 deletions(-)
---
diff --git a/data/theme/Makefile.am b/data/theme/Makefile.am
index b7722fb..ab0c0a1 100644
--- a/data/theme/Makefile.am
+++ b/data/theme/Makefile.am
@@ -11,8 +11,10 @@ nobase_dist_theme_DATA = Makefile.am \
gtk-2.0/Buttons/button-rounded-prelight.svg \
gtk-2.0/Buttons/button-rounded-pressed.svg \
gtk-2.0/Buttons/button-square-default.svg \
+ gtk-2.0/Buttons/button-square-focus.svg \
gtk-2.0/Buttons/button-square-prelight.svg \
gtk-2.0/Buttons/button-square-pressed.svg \
+ gtk-2.0/Buttons/null.png \
gtk-2.0/Buttons/null_bg.png \
gtk-2.0/Buttons/null_bg_light.png \
gtk-2.0/Check-Radio/checkbox-checked-insensitive.png \
diff --git a/data/theme/gtk-2.0/Buttons/button-square-focus.svg
b/data/theme/gtk-2.0/Buttons/button-square-focus.svg
new file mode 100644
index 0000000..027090d
--- /dev/null
+++ b/data/theme/gtk-2.0/Buttons/button-square-focus.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="44px" height="44px" viewBox="0 0 44 44" enable-background="new 0 0 44 44"
xml:space="preserve">
+<path id="plus_1_" fill="#6A6A6A" d="M1719.137,835.451c-0.297,0-0.535-0.238-0.535-0.535v-5.23h-5.23
+
c-0.297,0-0.537-0.237-0.537-0.532v-3.461c0-0.3,0.24-0.535,0.537-0.535h5.23v-5.23c0-0.299,0.238-0.537,0.535-0.537h3.461
+
c0.295,0,0.535,0.238,0.535,0.537v5.23h5.229c0.297,0,0.537,0.235,0.537,0.535v3.461c0,0.295-0.24,0.532-0.537,0.532h-5.229v5.23
+ c0,0.297-0.24,0.535-0.535,0.535H1719.137z"/>
+<path id="plus_12_" fill="#6A6A6A" d="M1730.625,833.451c-0.297,0-0.533-0.238-0.533-0.535v-5.23h-5.23
+
c-0.297,0-0.537-0.236-0.537-0.531v-3.461c0-0.301,0.24-0.535,0.537-0.535h5.23v-5.23c0-0.299,0.236-0.537,0.533-0.537h3.463
+
c0.295,0,0.535,0.238,0.535,0.537v5.23h5.229c0.301,0,0.537,0.234,0.537,0.535v3.461c0,0.295-0.236,0.531-0.537,0.531h-5.229v5.23
+ c0,0.297-0.24,0.535-0.535,0.535H1730.625z"/>
+<path opacity="0.8" fill="#50B44D" enable-background="new " d="M39.6,44H4.4C1.974,44,0,42.025,0,39.602V4.4
+ C0,1.974,1.974,0,4.4,0h35.2C42.025,0,44,1.974,44,4.4v35.2C44,42.025,42.025,44,39.6,44z M4.4,0.978
+
c-1.887,0-3.422,1.536-3.422,3.422v35.2c0,1.887,1.535,3.422,3.422,3.422h35.2c1.887,0,3.422-1.535,3.422-3.422V4.4
+ c0-1.887-1.535-3.422-3.422-3.422H4.4z"/>
+</svg>
diff --git a/data/theme/gtk-2.0/Buttons/null.png b/data/theme/gtk-2.0/Buttons/null.png
new file mode 100644
index 0000000..6e99f81
Binary files /dev/null and b/data/theme/gtk-2.0/Buttons/null.png differ
diff --git a/data/theme/gtk-2.0/buttons.rc b/data/theme/gtk-2.0/buttons.rc
index 2c86a75..3fb29db 100644
--- a/data/theme/gtk-2.0/buttons.rc
+++ b/data/theme/gtk-2.0/buttons.rc
@@ -1,3 +1,16 @@
+style "longomatch-button-nofocus" = "longomatch-default"
+{
+ engine "pixmap"
+ {
+ image
+ {
+ function = FOCUS
+ file = "Buttons/null.png"
+ border = { 4, 4, 4, 4 }
+ stretch = TRUE
+ }
+ }
+}
style "longomatch-rounded-button" = "longomatch-default"
{
@@ -37,6 +50,13 @@ style "longomatch-rounded-button" = "longomatch-default"
border = { 4, 4, 4, 4 }
stretch = TRUE
}
+ image
+ {
+ function = FOCUS
+ file = "Buttons/null.png"
+ border = { 4, 4, 4, 4 }
+ stretch = TRUE
+ }
}
}
@@ -76,6 +96,13 @@ style "longomatch-rect-button" = "longomatch-default"
border = { 4, 4, 4, 4 }
stretch = TRUE
}
+ image
+ {
+ function = FOCUS
+ file = "Buttons/null.png"
+ border = { 4, 4, 4, 4 }
+ stretch = TRUE
+ }
}
}
@@ -115,5 +142,12 @@ style "longomatch-square-button" = "longomatch-default"
border = { 4, 4, 4, 4 }
stretch = TRUE
}
+ image
+ {
+ function = FOCUS
+ file = "Buttons/button-square-focus.svg"
+ border = { 4, 4, 4, 4 }
+ stretch = TRUE
+ }
}
}
diff --git a/data/theme/gtk-2.0/gtkrc b/data/theme/gtk-2.0/gtkrc
index 7cb604b..00cad1b 100644
--- a/data/theme/gtk-2.0/gtkrc
+++ b/data/theme/gtk-2.0/gtkrc
@@ -16,7 +16,6 @@ gtk-alternative-button-order = 1
style "longomatch-default"
{
- GtkWidget::interior-focus = 1
GtkOptionMenu::indicator-size = { 9, 5 }
GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
GtkSpinButton::shadow-type = in
@@ -31,11 +30,10 @@ style "longomatch-default"
GtkToolbar::shadow-type = GTK_SHADOW_NONE
- GtkButton::focus-line-width = 0
- GtkButton::focus-on-click = 0
-
- GtkButton::focus-line-width = 0
+ GtkWidget::focus-line-width = 0
GtkButton::focus-on-click = 0
+ GtkButton::interior-focus = 0
+ GtkButton::focus-padding = 0
#xthickness = 0
#ythickness = 0
@@ -155,6 +153,7 @@ widget_class "*.GtkMenu.*" style "longomatch-menuitem"
widget_class "*.GtkMenuBar.*" style "longomatch-menuitem"
# Comboboxes get a nice rounded border with green arrows
widget_class "*<GtkComboBox>" style "longomatch-combobox"
+widget_class "*<GtkComboBox>*<GtkButton>" style "longomatch-button-nofocus"
# Custom combos for team vs team
widget_class "*HomeTeamsComboBox*" style "longomatch-home-teams-combobox"
widget_class "*AwayTeamsComboBox*" style "longomatch-away-teams-combobox"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]