mirror of
https://github.com/ankitects/anki.git
synced 2025-11-17 18:17:12 -05:00
Including QPushButton, QComboBox, QSpinBox, QLineEdit, QListWidget, QTabWidget, QTreeWidget, QToolTip, QTableView, QScrollBar and sub-widgets.
64 lines
1.8 KiB
SCSS
64 lines
1.8 KiB
SCSS
/* Copyright: Ankitects Pty Ltd and contributors
|
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
|
@use "fusion-vars";
|
|
@use "sass:color";
|
|
@use "sass/button-mixins" as button;
|
|
|
|
$btn-base-color-day: white;
|
|
$btn-base-color-night: fusion-vars.$button-border;
|
|
$size: var(--buttons-size);
|
|
$padding: 2px;
|
|
|
|
.linkb {
|
|
width: $size;
|
|
height: $size;
|
|
padding: $padding;
|
|
color: var(--text-fg);
|
|
font-size: calc($size * 0.6);
|
|
background-color: $btn-base-color-day;
|
|
border: 1px solid var(--medium-border);
|
|
@include button.btn-border-radius;
|
|
&:hover {
|
|
background-color: color.scale($btn-base-color-day, $lightness: -20%);
|
|
}
|
|
|
|
&:active,
|
|
&:active:hover {
|
|
@include button.impressed-shadow(0.25);
|
|
}
|
|
|
|
.nightMode & {
|
|
border: 1px solid fusion-vars.$button-border;
|
|
-webkit-appearance: none;
|
|
background: linear-gradient(
|
|
0deg,
|
|
fusion-vars.$button-gradient-start 0%,
|
|
fusion-vars.$button-gradient-end 100%
|
|
);
|
|
border: 1px solid fusion-vars.$button-border;
|
|
margin-left: 1px;
|
|
|
|
&:hover {
|
|
background: linear-gradient(
|
|
0deg,
|
|
color.scale(fusion-vars.$button-gradient-start, $lightness: 20%) 0%,
|
|
color.scale(fusion-vars.$button-gradient-end, $lightness: 20%) 100%
|
|
);
|
|
border-color: color.scale(fusion-vars.$button-border, $lightness: 20%);
|
|
}
|
|
|
|
&:active {
|
|
@include button.impressed-shadow(0.35);
|
|
border-color: color.scale($btn-base-color-night, $lightness: -20%);
|
|
}
|
|
}
|
|
}
|
|
|
|
img.topbut {
|
|
max-width: calc($size - 2 * $padding);
|
|
max-height: calc($size - 2 * $padding);
|
|
vertical-align: baseline;
|
|
.nightMode & {
|
|
filter: invert(1);
|
|
}
|
|
}
|