Warning, /plasma/breeze-gtk/src/gtk4/widgets/_entry.scss is written in an unsupported language. File is not indexed.
0001 @charset "UTF-8";
0002
0003 @mixin entry(
0004 $t,
0005 $fc: gtk("@theme_view_active_decoration_color")
0006 ) {
0007 //
0008 // Entries drawing function
0009 //
0010 // $t: entry type
0011 // $fc: focus color
0012 // $edge: set to none to not draw the bottom edge or specify a color to not
0013 // use the default one
0014 //
0015 // possible $t values:
0016 // normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop;
0017 //
0018 @if $t==normal {
0019 color: gtk("@theme_text_color");
0020 border-color: gtk("@borders");
0021 background-color: gtk("@theme_base_color");
0022 box-shadow: none;
0023 }
0024
0025 @if $t==focus {
0026 border-color: $fc;
0027 }
0028
0029 @if $t==insensitive {
0030 color: gtk("@insensitive_base_fg_color");
0031 border-color: gtk("@insensitive_borders");
0032 background-color: gtk("@insensitive_base_color");
0033 }
0034
0035 @if $t==backdrop {
0036 color: gtk("@theme_unfocused_text_color");
0037 border-color: gtk("@unfocused_borders");
0038 background-color: gtk("@theme_unfocused_base_color");
0039 }
0040
0041 @if $t==backdrop-insensitive {
0042 color: gtk("@theme_unfocused_view_text_color");
0043 border-color: gtk("@unfocused_insensitive_borders");
0044 background-color: gtk("@theme_unfocused_view_bg_color");
0045 }
0046 }
0047
0048 /****************
0049 * Text Entries *
0050 ****************/
0051
0052 %entry,
0053 entry {
0054 %entry_basic,
0055 & {
0056 min-height: 30px;
0057 padding-left: 8px;
0058 padding-right: 8px;
0059 border: 1px solid;
0060 border-radius: $r;
0061
0062 @include entry(normal);
0063
0064 image {
0065 // icons inside the entry
0066 &.left {
0067 padding-left: 0;
0068 padding-right: 6px;
0069 }
0070 &.right {
0071 padding-left: 6px;
0072 padding-right: 0;
0073 }
0074 }
0075 // FIXME
0076 // undershoot {
0077 // &.left { @include undershoot(left); }
0078 // &.right { @include undershoot(right); }
0079 // }
0080
0081 &.flat {
0082 &:focus,
0083 & {
0084 min-height: 0;
0085 padding: 2px;
0086 @include entry(normal);
0087 }
0088 }
0089 &:focus {
0090 @include entry(focus);
0091 }
0092 &:disabled {
0093 @include entry(insensitive);
0094 }
0095 &:backdrop {
0096 @include entry(backdrop);
0097 }
0098 &:backdrop:disabled {
0099 @include entry(backdrop-insensitive);
0100 }
0101
0102 selection {
0103 &:focus,
0104 & {
0105 @extend %selected_items;
0106 }
0107 }
0108
0109 @each $e_type, $e_color in (error, gtk("@error_color")),
0110 (warning, gtk("@warning_color"))
0111 {
0112 &.#{$e_type} {
0113 color: $e_color;
0114 border-color: $e_color;
0115 background-color: gtkalpha($e_color, 0.5);
0116 &:focus {
0117 @include entry(focus, $e_color);
0118 background-color: gtkalpha($e_color, 0.5);
0119 }
0120 &:selected,
0121 &:selected:focus {
0122 background-color: $e_color;
0123 }
0124 &:backdrop {
0125 @if $e_color == gtk("@error_color") {
0126 color: gtk("@error_color_backdrop");
0127 border-color: gtk("@error_color_backdrop");
0128 background-color: gtkalpha(
0129 gtk("@error_color_backdrop"),
0130 0.5
0131 );
0132 } @else if $e_color == gtk("@warning_color") {
0133 color: gtk("@warning_color_backdrop");
0134 border-color: gtk("@warning_color_backdrop");
0135 background-color: gtkalpha(
0136 gtk("@warning_color_backdrop"),
0137 0.5
0138 );
0139 }
0140 }
0141 }
0142 }
0143
0144 image {
0145 // entry icons colors
0146 color: gtkmix(
0147 gtk("@theme_fg_color"),
0148 gtk("@theme_text_color"),
0149 0.8
0150 );
0151 &:hover {
0152 color: gtk("@theme_button_decoration_hover");
0153 }
0154 &:active {
0155 color: gtk("@theme_button_decoration_focus");
0156 }
0157 &:backdrop {
0158 color: gtkmix(
0159 gtk("@theme_unfocused_fg_color"),
0160 gtk("@theme_unfocused_fg_color"),
0161 0.8
0162 );
0163 }
0164 }
0165 // FIXME
0166 // &:drop(active) {
0167 // &:focus, & {
0168 // border-color: $drop_target_color;
0169 // box-shadow: inset 0 0 0 1px $drop_target_color;
0170 // }
0171 // }
0172 }
0173
0174 progress {
0175 margin: 1px;
0176 border-radius: 0;
0177 border-width: 0 0 2px;
0178 border-color: gtk("@theme_selected_bg_color");
0179 border-style: solid;
0180 background-image: none;
0181 background-color: transparent;
0182 box-shadow: none;
0183 &:backdrop {
0184 background-color: transparent;
0185 border-color: gtk(
0186 "@theme_unfocused_selected_bg_color"
0187 );
0188 }
0189 }
0190 }
0191
0192 treeview acceleditor > label {
0193 background-color: gtk("@theme_selected_bg_color");
0194 }
0195
0196 treeview entry {
0197 &.flat,
0198 & {
0199 border-radius: 0;
0200 background-image: none;
0201 background-color: gtk("@theme_base_color");
0202
0203 &:focus {
0204 border-color: gtk(
0205 "@theme_view_active_decoration_color"
0206 );
0207 }
0208 }
0209 }
0210
0211 combobox > box > button.combo:not(:only-child) {
0212 background: none;
0213 @include entry(normal);
0214
0215 &:focus {
0216 @include entry(focus);
0217 }
0218 &:disabled {
0219 @include entry(insensitive);
0220 }
0221 &:backdrop {
0222 @include entry(backdrop);
0223 }
0224 &:backdrop:disabled {
0225 @include entry(backdrop-insensitive);
0226 }
0227 }
0228