Skip to content

Commit 6cb9d03

Browse files
committed
Optimize buttons. Fixes #452
This only sets minimum button height-width to 16px so that gtk-widgets can use lowest icon-size at 16x16px.
1 parent 4c2cf03 commit 6cb9d03

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

gtk-3.20/scss/apps/_nemo.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
}
4848

4949
&.primary-toolbar button {
50-
padding: 5px 6px;
50+
min-width: 28px;
51+
padding: 3px;
5152
}
5253

5354
/* Path Bar */
@@ -66,8 +67,8 @@
6667
grid {
6768
> widget:last-child {
6869
button {
69-
min-height: 15px;
70-
min-width: 20px;
70+
min-height: 16px;
71+
min-width: 16px;
7172
}
7273

7374
button:first-child {

gtk-3.20/scss/widgets/_button.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
}
4444

4545
%button {
46+
min-height: 16px;
47+
min-width: 16px;
4648
padding: $spacing ($spacing + 2px);
4749
border-width: 1px;
4850
border-style: solid;
@@ -372,8 +374,6 @@
372374
}
373375

374376
button {
375-
min-height: 22px;
376-
min-width: 24px;
377377
@include button(shade($bg_color, 1.2), $fg_color);
378378

379379
.inline-toolbar &,
@@ -494,7 +494,7 @@
494494

495495
box button, box entry {
496496
@extend %linked_button;
497-
padding: ($spacing - 2px) ($spacing + 1px);
497+
padding: $spacing ($spacing + 2px);
498498
}
499499

500500
.linked:not(.vertical) > & > box > button.combo {

gtk-3.20/scss/widgets/_misc.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
// shortcut window keys
250250
.keycap {
251251
min-width: 20px;
252-
min-height: 25px;
252+
min-height: 24px;
253253
margin-top: 2px;
254254
padding-bottom: $spacing / 2;
255255
padding-left: $spacing;
@@ -278,11 +278,11 @@
278278

279279
@include exports("stackswitcher") {
280280
stackswitcher button {
281-
&.text-button { min-width: 90px; } // FIXME aggregate with buttons
281+
&.text-button { min-width: 80px; } // FIXME aggregate with buttons
282282

283283
&.circular { // FIXME aggregate with buttons
284-
min-width: 32px;
285-
min-height: 32px;
284+
min-width: 28px;
285+
min-height: 28px;
286286
padding: 0;
287287
}
288288
}

gtk-3.20/scss/widgets/_notebook.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@
153153
outline: none;
154154

155155
button, button:hover {
156-
padding: $spacing - 4;
157156
margin-left: 15px;
158-
min-height: 18px;
159-
min-width: 18px;
160157
opacity: 0;
161158
transition: opacity .3s ease-in;
162159
}
@@ -198,7 +195,9 @@
198195
}
199196

200197
/* close button styling */
201-
button {
198+
button.flat {
199+
min-height: 16px;
200+
min-width: 16px;
202201
@extend %close_button;
203202
}
204203
}

0 commit comments

Comments
 (0)