From 93602e545abe64db5eef8b69fbbad8c496421d04 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 09:24:36 +0200 Subject: [PATCH 1/9] * Optimised big button. Fixed #452 --- gtk-3.20/scss/widgets/_button.scss | 53 +++++++++++++++++++++++++--- gtk-3.20/scss/widgets/_choosers.scss | 2 +- gtk-3.20/scss/widgets/_entry.scss | 3 +- gtk-3.20/scss/widgets/_menu.scss | 4 ++- gtk-3.20/scss/widgets/_misc.scss | 8 ++--- gtk-3.20/scss/widgets/_notebook.scss | 9 ++--- gtk-3.20/scss/widgets/_osd.scss | 3 -- 7 files changed, 61 insertions(+), 21 deletions(-) diff --git a/gtk-3.20/scss/widgets/_button.scss b/gtk-3.20/scss/widgets/_button.scss index 97834ca..d61e569 100644 --- a/gtk-3.20/scss/widgets/_button.scss +++ b/gtk-3.20/scss/widgets/_button.scss @@ -43,7 +43,9 @@ } %button { - padding: $spacing ($spacing + 2px); + min-height: 22px; + min-width: 20px; + padding: ($spacing - 3px) ($spacing + 1px); border-width: 1px; border-style: solid; border-radius: $roundness; @@ -341,6 +343,27 @@ } } + &.image-button { + min-width: 24px; + padding-left: $spacing; + padding-right: $spacing; + } + + &.text-button { + padding-left: $spacing * 2; + padding-right: $spacing * 2; + } + + &.text-button.image-button { + padding-left: $spacing; + padding-right: $spacing; + + label { + padding-left: $spacing; + padding-right: $spacing; + } + } + &.separator, .separator { border: 1px solid currentColor; color: shade($bg, ($contrast + .1)); @@ -351,6 +374,8 @@ @include exports("button") { %close_button { + min-height: 22px; + min-width: 16px; border: 1px solid transparent; background-color: transparent; background-image: none; @@ -372,8 +397,6 @@ } button { - min-height: 22px; - min-width: 24px; @include button(shade($bg_color, 1.2), $fg_color); .inline-toolbar &, @@ -381,7 +404,21 @@ .linked.vertical > & { @include linked_vertical_button(shade($bg_color, 1.2)); } - &.circular { // FIXME: aggregate to buttons + &.osd { + @include button($osd_bg, $osd_fg); + + &.image-button { + padding: 0; + min-height: 36px; + min-width: 36px; + } + } + + &.circular, + &.circular-button { // FIXME: aggregate to buttons + padding: 0; + min-width: 26px; + min-height: 26px; border-radius: 9999px; // Fixed: https://github.com/GNOME/gtk/commit/a6409458f0d50d673a4dc370b9251993b7835b6b -gtk-outline-radius: 9999px; @@ -453,6 +490,12 @@ } &.vertical { + button, entry { + min-width: 0; + padding-left: $spacing - 1px; + padding-right: $spacing - 1px; + } + entry { // reset all the other props since the spinbutton node is styled here border-radius: 0; @@ -494,7 +537,7 @@ box button, box entry { @extend %linked_button; - padding: ($spacing - 2px) ($spacing + 1px); + padding: ($spacing - 3px) ($spacing + 1px); } .linked:not(.vertical) > & > box > button.combo { diff --git a/gtk-3.20/scss/widgets/_choosers.scss b/gtk-3.20/scss/widgets/_choosers.scss index 803329b..c510461 100644 --- a/gtk-3.20/scss/widgets/_choosers.scss +++ b/gtk-3.20/scss/widgets/_choosers.scss @@ -140,7 +140,7 @@ } button.color { - padding: $spacing; + padding: $spacing - 1px; colorswatch:only-child { &, overlay { border-radius: 0; } diff --git a/gtk-3.20/scss/widgets/_entry.scss b/gtk-3.20/scss/widgets/_entry.scss index cd96ad1..9d74bd3 100644 --- a/gtk-3.20/scss/widgets/_entry.scss +++ b/gtk-3.20/scss/widgets/_entry.scss @@ -87,6 +87,7 @@ } %entry { + min-height: 22px; border-width: 1px; border-style: solid; border-radius: $roundness; @@ -123,7 +124,7 @@ @include linear-gradient($bg, to top); @include border($bg); - padding: $spacing; + padding: ($spacing - 3px) ($spacing + 3px); color: $fg; caret-color: $fg; diff --git a/gtk-3.20/scss/widgets/_menu.scss b/gtk-3.20/scss/widgets/_menu.scss index 0dbeed9..c7c7bd2 100644 --- a/gtk-3.20/scss/widgets/_menu.scss +++ b/gtk-3.20/scss/widgets/_menu.scss @@ -287,7 +287,9 @@ } modelbutton { - padding: $spacing ($spacing + 2px); + min-height: 24px; + padding-left: ($spacing + 3px); + padding-right: ($spacing + 3px); border: none; transition: 150ms ease; outline-color: transparent; diff --git a/gtk-3.20/scss/widgets/_misc.scss b/gtk-3.20/scss/widgets/_misc.scss index 4498a6d..dd11d08 100644 --- a/gtk-3.20/scss/widgets/_misc.scss +++ b/gtk-3.20/scss/widgets/_misc.scss @@ -278,13 +278,9 @@ @include exports("stackswitcher") { stackswitcher button { - &.text-button { min-width: 90px; } // FIXME aggregate with buttons + &.text-button { min-width: 80px; } // FIXME aggregate with buttons - &.circular { // FIXME aggregate with buttons - min-width: 32px; - min-height: 32px; - padding: 0; - } + &.circular { min-width: 0; } // FIXME aggregate with buttons } } diff --git a/gtk-3.20/scss/widgets/_notebook.scss b/gtk-3.20/scss/widgets/_notebook.scss index dbd16a7..c2f1038 100644 --- a/gtk-3.20/scss/widgets/_notebook.scss +++ b/gtk-3.20/scss/widgets/_notebook.scss @@ -153,10 +153,7 @@ outline: none; button, button:hover { - padding: $spacing - 4; margin-left: 15px; - min-height: 18px; - min-width: 18px; opacity: 0; transition: opacity .3s ease-in; } @@ -198,8 +195,12 @@ } /* close button styling */ - button { + button.flat { @extend %close_button; + + min-height: 16px; + min-width: 16px; + padding: 0; } } diff --git a/gtk-3.20/scss/widgets/_osd.scss b/gtk-3.20/scss/widgets/_osd.scss index e6365f8..687e782 100644 --- a/gtk-3.20/scss/widgets/_osd.scss +++ b/gtk-3.20/scss/widgets/_osd.scss @@ -19,9 +19,6 @@ background-origin: border-box; } - button { @include button($osd_bg, $osd_fg); } - - toolbar { -GtkToolbar-button-relief: normal; From b29c83f1d34173dabc5a7668912feaf37c2e1d51 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 11:11:56 +0200 Subject: [PATCH 2/9] * Fixed button.color padding. --- gtk-3.20/scss/widgets/_choosers.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk-3.20/scss/widgets/_choosers.scss b/gtk-3.20/scss/widgets/_choosers.scss index c510461..25465bb 100644 --- a/gtk-3.20/scss/widgets/_choosers.scss +++ b/gtk-3.20/scss/widgets/_choosers.scss @@ -140,7 +140,14 @@ } button.color { - padding: $spacing - 1px; + padding: $spacing - 3px; + + colorswatch:first-child:last-child { + &, overlay { + margin: $spacing - 1px; + border-radius: 0; + } + } colorswatch:only-child { &, overlay { border-radius: 0; } From 2816ed6eebcc29825a141a650d65c326b056b809 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 15:51:29 +0200 Subject: [PATCH 3/9] * Fixed minimal 16px. --- gtk-3.20/scss/widgets/_button.scss | 43 ++++++++++++++++++++++++------ gtk-3.20/scss/widgets/_entry.scss | 4 +-- gtk-3.20/scss/widgets/_menu.scss | 2 +- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/gtk-3.20/scss/widgets/_button.scss b/gtk-3.20/scss/widgets/_button.scss index d61e569..0e65e54 100644 --- a/gtk-3.20/scss/widgets/_button.scss +++ b/gtk-3.20/scss/widgets/_button.scss @@ -43,9 +43,9 @@ } %button { - min-height: 22px; - min-width: 20px; - padding: ($spacing - 3px) ($spacing + 1px); + min-height: 16px; + min-width: 16px; + padding: ($spacing + 1px) $spacing; border-width: 1px; border-style: solid; border-radius: $roundness; @@ -344,7 +344,7 @@ } &.image-button { - min-width: 24px; + min-width: 16px; padding-left: $spacing; padding-right: $spacing; } @@ -374,7 +374,7 @@ @include exports("button") { %close_button { - min-height: 22px; + min-height: 16px; min-width: 16px; border: 1px solid transparent; background-color: transparent; @@ -417,8 +417,8 @@ &.circular, &.circular-button { // FIXME: aggregate to buttons padding: 0; - min-width: 26px; - min-height: 26px; + min-width: 28px; + min-height: 28px; border-radius: 9999px; // Fixed: https://github.com/GNOME/gtk/commit/a6409458f0d50d673a4dc370b9251993b7835b6b -gtk-outline-radius: 9999px; @@ -426,6 +426,33 @@ } } + .path-bar button { + &.text-button, &.image-button, & { + padding-left: $spacing; + padding-right: $spacing; + } + + &.text-button.image-button label { + padding-left: 0; + padding-right: 0; + } + + &.text-button.image-button, & { + label:last-child { padding-right: $spacing * 2; } + label:first-child { padding-left: $spacing * 2; } + } + + image { + padding-left: $spacing; + padding-right: $spacing; + } + + &.slider-button { + padding-left: 0; + padding-right: 0; + } + } + spinbutton { button { color: mix($text_color, $base_color, .4); @@ -537,7 +564,7 @@ box button, box entry { @extend %linked_button; - padding: ($spacing - 3px) ($spacing + 1px); + padding: ($spacing + 1px) $spacing; } .linked:not(.vertical) > & > box > button.combo { diff --git a/gtk-3.20/scss/widgets/_entry.scss b/gtk-3.20/scss/widgets/_entry.scss index 9d74bd3..532e0c4 100644 --- a/gtk-3.20/scss/widgets/_entry.scss +++ b/gtk-3.20/scss/widgets/_entry.scss @@ -87,7 +87,7 @@ } %entry { - min-height: 22px; + min-height: 16px; border-width: 1px; border-style: solid; border-radius: $roundness; @@ -124,7 +124,7 @@ @include linear-gradient($bg, to top); @include border($bg); - padding: ($spacing - 3px) ($spacing + 3px); + padding: ($spacing + 1px) ($spacing + 3px); color: $fg; caret-color: $fg; diff --git a/gtk-3.20/scss/widgets/_menu.scss b/gtk-3.20/scss/widgets/_menu.scss index c7c7bd2..4ffd1a5 100644 --- a/gtk-3.20/scss/widgets/_menu.scss +++ b/gtk-3.20/scss/widgets/_menu.scss @@ -287,7 +287,7 @@ } modelbutton { - min-height: 24px; + min-height: 16px; padding-left: ($spacing + 3px); padding-right: ($spacing + 3px); border: none; From 822b97f9cc5338c41f54150b93b6f61e9766512d Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 16:01:09 +0200 Subject: [PATCH 4/9] * Nemo minimal fix. --- gtk-3.20/scss/apps/_nemo.scss | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gtk-3.20/scss/apps/_nemo.scss b/gtk-3.20/scss/apps/_nemo.scss index 701521e..afd2ffe 100644 --- a/gtk-3.20/scss/apps/_nemo.scss +++ b/gtk-3.20/scss/apps/_nemo.scss @@ -45,10 +45,6 @@ border-color: currentColor; -GtkWidget-window-dragging: true; } - - &.primary-toolbar button { - padding: 5px 6px; - } /* Path Bar */ toolitem stack { @@ -65,11 +61,6 @@ /* Status Bar */ grid { > widget:last-child { - button { - min-height: 15px; - min-width: 20px; - } - button:first-child { margin-left: 20px; } From 8a74b162516c9f1008e4a1ac6e1a348101b5b9ab Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 16:02:15 +0200 Subject: [PATCH 5/9] * Nemo minimal fix 2. --- gtk-3.20/scss/apps/_nemo.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk-3.20/scss/apps/_nemo.scss b/gtk-3.20/scss/apps/_nemo.scss index afd2ffe..edd8c88 100644 --- a/gtk-3.20/scss/apps/_nemo.scss +++ b/gtk-3.20/scss/apps/_nemo.scss @@ -61,6 +61,12 @@ /* Status Bar */ grid { > widget:last-child { + button { + min-height: 16px; + min-width: 16px; + padding: ($spacing - 1px); + } + button:first-child { margin-left: 20px; } From f4ed30e2b8fbaed38e9d54804684e00b7a3c0efe Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 16:22:51 +0200 Subject: [PATCH 6/9] * Modelbutton fix. --- gtk-3.20/scss/widgets/_menu.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtk-3.20/scss/widgets/_menu.scss b/gtk-3.20/scss/widgets/_menu.scss index 4ffd1a5..0dbeed9 100644 --- a/gtk-3.20/scss/widgets/_menu.scss +++ b/gtk-3.20/scss/widgets/_menu.scss @@ -287,9 +287,7 @@ } modelbutton { - min-height: 16px; - padding-left: ($spacing + 3px); - padding-right: ($spacing + 3px); + padding: $spacing ($spacing + 2px); border: none; transition: 150ms ease; outline-color: transparent; From 6fa06d5f6bb041c58df4db061352f3514df0c045 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 22:21:38 +0200 Subject: [PATCH 7/9] * Fixed Nemo. --- gtk-3.20/scss/apps/_nemo.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk-3.20/scss/apps/_nemo.scss b/gtk-3.20/scss/apps/_nemo.scss index edd8c88..d291be3 100644 --- a/gtk-3.20/scss/apps/_nemo.scss +++ b/gtk-3.20/scss/apps/_nemo.scss @@ -45,6 +45,11 @@ border-color: currentColor; -GtkWidget-window-dragging: true; } + + &.primary-toolbar button { + min-width: 28px; + padding: 3px; + } /* Path Bar */ toolitem stack { From cf018975c08318579b4196523e4be46d8da589b5 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 22:29:14 +0200 Subject: [PATCH 8/9] * Fixed circular button keycap. --- gtk-3.20/scss/widgets/_misc.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk-3.20/scss/widgets/_misc.scss b/gtk-3.20/scss/widgets/_misc.scss index dd11d08..a27e239 100644 --- a/gtk-3.20/scss/widgets/_misc.scss +++ b/gtk-3.20/scss/widgets/_misc.scss @@ -280,7 +280,11 @@ stackswitcher button { &.text-button { min-width: 80px; } // FIXME aggregate with buttons - &.circular { min-width: 0; } // FIXME aggregate with buttons + &.circular { // FIXME aggregate with buttons + min-width: 28px; + min-height: 28px; + padding: 0; + } } } From 4335ee96b92d01c4d224292b6b8fa7aaab083e42 Mon Sep 17 00:00:00 2001 From: Megax <megax@yeahunter.hu> Date: Mon, 29 Aug 2016 22:32:31 +0200 Subject: [PATCH 9/9] * Keycap button fix. --- gtk-3.20/scss/widgets/_misc.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-3.20/scss/widgets/_misc.scss b/gtk-3.20/scss/widgets/_misc.scss index a27e239..d30b9a9 100644 --- a/gtk-3.20/scss/widgets/_misc.scss +++ b/gtk-3.20/scss/widgets/_misc.scss @@ -249,7 +249,7 @@ // shortcut window keys .keycap { min-width: 20px; - min-height: 25px; + min-height: 24px; margin-top: 2px; padding-bottom: $spacing / 2; padding-left: $spacing;