Skip to content

Commit 7ac68f6

Browse files
committed
fix notebook tab padding issues for some applications. Fixes #588
1 parent aea6d16 commit 7ac68f6

2 files changed

Lines changed: 37 additions & 46 deletions

File tree

src/gtk-3.20/scss/widgets/_button.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,15 @@
364364
box-shadow: none;
365365

366366
&:focus, &:hover {
367-
border: 1px solid alpha($black, .3);
367+
border: 1px solid alpha($bg_color, .1);
368368
background-color: alpha($white, .2);
369369
background-image: none;
370370
box-shadow: none;
371371
}
372372

373373
&:active, &:checked, &:active:hover, &:checked:hover {
374-
border: 1px solid alpha($black, .3);
375-
background-color: alpha($black, .1);
374+
border: 1px solid alpha($selected_bg_color, .2);
375+
background-color: alpha($white, .2);
376376
background-image: none;
377377
box-shadow: none;
378378
}

src/gtk-3.20/scss/widgets/_notebook.scss

Lines changed: 34 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -144,35 +144,53 @@
144144
}
145145

146146
tab {
147-
padding: ($spacing + 1) 0 0; // top | left/right | bottom
147+
padding: 0;
148148
border-style: solid;
149149
border-width: 1px; // for reorderable tabs
150150
border-color: transparent; //
151151
background-image: none;
152152
box-shadow: none;
153153
outline: none;
154154

155-
button, button:hover {
156-
margin-left: 15px;
157-
opacity: 0;
158-
transition: opacity .3s ease-in;
159-
}
160-
161-
> box, > label {
162-
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
155+
> box,
156+
> label,
157+
> widget > box {
158+
padding: ($spacing + 2) ($spacing * 3); // top/bottom | left/right
163159
border-width: 2px;
164160
border-style: solid;
165161
border-color: transparent;
166-
transition: border-color .3s ease-out;
162+
transition: border-color .2s linear;
163+
}
164+
165+
&.reorderable-page {
166+
> box,
167+
> label,
168+
> widget > box {
169+
padding: ($spacing + 2) ($spacing * 2) ($spacing + 2) ($spacing * 3); // top | right | bottom | left
170+
}
171+
}
172+
173+
/* close button styling */
174+
button,
175+
button.flat {
176+
@extend %close_button;
177+
178+
min-height: 16px;
179+
min-width: 16px;
180+
padding: 0;
181+
margin-left: $spacing * 3;
182+
border: 1px solid transparent;
183+
transition: all .1s linear;
167184
}
168185

169186
&:hover {
170187
background-color: shade($base_color, .93);
171188
border-color: transparent;
172189
outline: none;
173190

174-
button, button:hover {
175-
opacity: 1;
191+
button,
192+
button.flat {
193+
border: 1px solid alpha($bg_color, .1);
176194
}
177195
}
178196

@@ -193,15 +211,6 @@
193211
label {
194212
color: mix($text_color, $base_color, .3);
195213
}
196-
197-
/* close button styling */
198-
button.flat {
199-
min-height: 16px;
200-
min-width: 16px;
201-
padding: 0;
202-
203-
@extend %close_button;
204-
}
205214
}
206215

207216
&.top tab,
@@ -267,16 +276,11 @@
267276
}
268277

269278
&.top tab {
270-
padding: ($spacing + 1) 0 0; // top | left/right | bottom
271279
border-style: solid;
272280
border-color: $borders_color;
273281
border-width: 0;
274282
border-bottom-width: 1px;
275-
transition: border-bottom-color .3s ease-out;
276-
277-
> box, > label {
278-
padding: 0 ($spacing * 3) ($spacing + 1); // top | left/right | bottom
279-
}
283+
transition: border-bottom-color .2s linear;
280284

281285
&:hover {
282286
outline: none;
@@ -286,7 +290,9 @@
286290
border-bottom-color: $selected_bg_color;
287291
outline: none;
288292

289-
> box, > label {
293+
> box,
294+
> label,
295+
> widget > box {
290296
border-bottom-color: $selected_bg_color;
291297
}
292298

@@ -302,17 +308,12 @@
302308
}
303309

304310
&.right tab {
305-
padding: 0 ($spacing + 1) 0 0; // top | right | bottom | left
306311
border-style: solid;
307312
border-color: $borders_color;
308313
border-width: 0;
309314
border-left-width: 1px;
310315
transition: border-left-color .3s ease-out;
311316

312-
> box, > label {
313-
padding: ($spacing + 1) ($spacing * 3); // top | right | bottom | left
314-
}
315-
316317
&:hover {
317318
outline: none;
318319
}
@@ -337,17 +338,12 @@
337338
}
338339

339340
&.bottom tab {
340-
padding: 0 0 ($spacing + 1); // top | left/right | bottom
341341
border-style: solid;
342342
border-color: $borders_color;
343343
border-width: 0;
344344
border-top-width: 1px;
345345
transition: border-top-color .3s ease-out;
346346

347-
> box, > label {
348-
padding: ($spacing + 1) ($spacing * 3) 0; // top/bottom | left/right
349-
}
350-
351347
&:hover {
352348
outline: none;
353349
}
@@ -372,17 +368,12 @@
372368
}
373369

374370
&.left tab {
375-
padding: 0 0 0 ($spacing + 1); // top | right | bottom | left
376371
border-style: solid;
377372
border-color: $borders_color;
378373
border-width: 0;
379374
border-right-width: 1px;
380375
transition: border-right-color .3s ease-out;
381376

382-
> box, > label {
383-
padding: ($spacing + 1) ($spacing * 3); // top/bottom | left/right
384-
}
385-
386377
&:hover {
387378
outline: none;
388379
}

0 commit comments

Comments
 (0)