GTK4: Add setting for compact widgets
This commit is contained in:
parent
2dda99edcc
commit
bc725bd507
@ -1,9 +1,22 @@
|
||||
$_widget_inset_shadow: inset 0 3px 10px -4px $shadow_color, 0 1px rgba(255, 255, 255, .05);
|
||||
|
||||
// Optional compact sizes for buttons, headerbar and headerbar widgets
|
||||
$_sizevariant: 'compact'; //compact otherwise
|
||||
$_headerbar_height: if($_sizevariant=='default', 46px, 40px);
|
||||
$_entry_height: if($_sizevariant=='default', 32px, 28px);
|
||||
$_btn_pad: if($_sizevariant=='default', 4px 9px, 2px 6px);
|
||||
$_hb_btn_pad: if($_sizevariant=='default', 6px, 5px);
|
||||
$_img_btn_pad: if($_sizevariant=='default', 5px, 2px);
|
||||
$_circ_btn_pad: if($_sizevariant=='default', 4px, 2px);
|
||||
$_switch_margin: if($_sizevariant=='default', 10px, 7px);
|
||||
|
||||
/**********
|
||||
* Button *
|
||||
**********/
|
||||
%button,
|
||||
button {
|
||||
@at-root %button_basic, & { padding: $_btn_pad; }
|
||||
|
||||
@at-root %button_active,
|
||||
&:active,
|
||||
&:checked {
|
||||
@ -23,6 +36,17 @@ button {
|
||||
|
||||
&:backdrop { @include button(undecorated); }
|
||||
}
|
||||
|
||||
&.image-button {
|
||||
padding-left: $_img_btn_pad;
|
||||
padding-right: $_img_btn_pad;
|
||||
}
|
||||
|
||||
&.circular {
|
||||
min-height: 24px;
|
||||
min-width: 24px;
|
||||
padding: $_circ_btn_pad;
|
||||
}
|
||||
}
|
||||
|
||||
/**********
|
||||
@ -30,6 +54,8 @@ button {
|
||||
**********/
|
||||
%entry,
|
||||
entry {
|
||||
%entry_basic, & { min-height: $_entry_height; }
|
||||
|
||||
&:not(:disabled) {
|
||||
box-shadow: $_widget_inset_shadow;
|
||||
background: if($variant=='dark', $dark_fill, $bg_color);
|
||||
@ -153,9 +179,11 @@ scale slider {
|
||||
/***************
|
||||
* Header bars *
|
||||
***************/
|
||||
.titlebar,
|
||||
%titlebar,
|
||||
headerbar {
|
||||
$_border_color: darken($bg_color, 20%);
|
||||
|
||||
min-height: $_headerbar_height;
|
||||
border-color: $_border_color;
|
||||
|
||||
$_scale_asset: 'assets/kali-headerbar-logo#{$asset_suffix}';
|
||||
@ -185,6 +213,20 @@ headerbar {
|
||||
}
|
||||
}
|
||||
|
||||
headerbar {
|
||||
entry,
|
||||
spinbutton,
|
||||
separator:not(.sidebar),
|
||||
button {
|
||||
margin-top: $_hb_btn_pad;
|
||||
margin-bottom: $_hb_btn_pad;
|
||||
}
|
||||
switch {
|
||||
margin-top: $_switch_margin;
|
||||
margin-bottom: $_switch_margin;
|
||||
}
|
||||
}
|
||||
|
||||
/*************
|
||||
* Notebooks *
|
||||
*************/
|
||||
@ -264,3 +306,6 @@ notebook {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
windowcontrols button { padding: $_hb_btn_pad; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user