[gtk+] Adwaita: uneven paddings on .text-button.image-button
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adwaita: uneven paddings on .text-button.image-button
- Date: Sat, 13 Sep 2014 10:28:03 +0000 (UTC)
commit dcffe0e2e36fcacbfefe8013d9b566234a1e4ba8
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Sat Sep 13 12:25:46 2014 +0200
Adwaita: uneven paddings on .text-button.image-button
We want buttons with an icon and text to have the padding of the
text-button on the label side and on the image-button on the icon
side.
gtk/resources/theme/Adwaita/_common.scss | 10 ++++++++++
gtk/resources/theme/Adwaita/gtk-contained-dark.css | 14 ++++++++++++--
gtk/resources/theme/Adwaita/gtk-contained.css | 14 ++++++++++++--
gtk/resources/theme/Adwaita/parse-sass.sh | 2 +-
4 files changed, 35 insertions(+), 5 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 9bc7656..76fcb82 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -506,6 +506,16 @@ $_dot_color: if($variant=='light', $selected_bg_color,
padding-right: 16px;
}
+ &.text-button.image-button {
+ // those buttons needs uneven horizontal padding, we want the icon side
+ // to have the image-button padding, while the text side the text-button
+ // one, so we're adding the missing padding to the label depending on
+ // its position inside the button
+ padding: 5px 8px 6px; // same as .button
+ GtkLabel:first-child { padding-left: 8px; }
+ GtkLabel:last-child { padding-right: 8px; }
+ }
+
.stack-switcher > & {
// to position the needs attention dot, padding is added to the button
// child, a label needs just lateral padding while an icon needs vertical
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index 05748a5..3bd93d5 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -820,6 +820,18 @@ GtkCalendar.header .button.titlebutton {
GtkCalendar.header .text-button.button.titlebutton {
padding-left: 16px;
padding-right: 16px; }
+ .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+ .titlebar .text-button.titlebutton.button,
+ GtkCalendar.header .text-button.titlebutton.button {
+ padding: 5px 8px 6px; }
+ .button.text-button.image-button GtkLabel:first-child, .header-bar .text-button.titlebutton.button
GtkLabel:first-child,
+ .titlebar .text-button.titlebutton.button GtkLabel:first-child,
+ GtkCalendar.header .text-button.titlebutton.button GtkLabel:first-child {
+ padding-left: 8px; }
+ .button.text-button.image-button GtkLabel:last-child, .header-bar .text-button.titlebutton.button
GtkLabel:last-child,
+ .titlebar .text-button.titlebutton.button GtkLabel:last-child,
+ GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
+ padding-right: 8px; }
.stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
.titlebar .stack-switcher > .button.titlebutton > GtkLabel,
GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
@@ -4167,5 +4179,3 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
@define-color wm_button_active_color_b shade(#393f3f, 0.89);
@define-color wm_button_active_color_c shade(#393f3f, 0.9);
@define-color content_view_bg #292929;
-
-/*# sourceMappingURL=gtk-contained-dark.css.map */
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index 75dec98..20cb00d 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -812,6 +812,18 @@ GtkCalendar.header .button.titlebutton {
GtkCalendar.header .text-button.button.titlebutton {
padding-left: 16px;
padding-right: 16px; }
+ .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+ .titlebar .text-button.titlebutton.button,
+ GtkCalendar.header .text-button.titlebutton.button {
+ padding: 5px 8px 6px; }
+ .button.text-button.image-button GtkLabel:first-child, .header-bar .text-button.titlebutton.button
GtkLabel:first-child,
+ .titlebar .text-button.titlebutton.button GtkLabel:first-child,
+ GtkCalendar.header .text-button.titlebutton.button GtkLabel:first-child {
+ padding-left: 8px; }
+ .button.text-button.image-button GtkLabel:last-child, .header-bar .text-button.titlebutton.button
GtkLabel:last-child,
+ .titlebar .text-button.titlebutton.button GtkLabel:last-child,
+ GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
+ padding-right: 8px; }
.stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
.titlebar .stack-switcher > .button.titlebutton > GtkLabel,
GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
@@ -4326,5 +4338,3 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
@define-color wm_button_active_color_b shade(#ededed, 0.89);
@define-color wm_button_active_color_c shade(#ededed, 0.9);
@define-color content_view_bg #ffffff;
-
-/*# sourceMappingURL=gtk-contained.css.map */
diff --git a/gtk/resources/theme/Adwaita/parse-sass.sh b/gtk/resources/theme/Adwaita/parse-sass.sh
index 2486480..333bbc5 100755
--- a/gtk/resources/theme/Adwaita/parse-sass.sh
+++ b/gtk/resources/theme/Adwaita/parse-sass.sh
@@ -1,3 +1,3 @@
#!/usr/bin/bash
-sass --update .
+sass --update --sourcemap=none .
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]