mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
Improve appearance of main window
This commit is contained in:
parent
17e9e707af
commit
039b56f8fe
6 changed files with 42 additions and 34 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
/* Copyright: Ankitects Pty Ltd and contributors
|
/* Copyright: Ankitects Pty Ltd and contributors
|
||||||
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
||||||
@use "sass/base";
|
@use "root-vars";
|
||||||
@use "sass/vars" as *;
|
@use "sass/vars" as *;
|
||||||
@use "sass/card-counts";
|
@use "sass/card-counts";
|
||||||
|
|
||||||
|
|
@ -38,6 +38,9 @@ body {
|
||||||
|
|
||||||
.current {
|
.current {
|
||||||
background-color: color(shadow-subtle);
|
background-color: color(shadow-subtle);
|
||||||
|
.gears {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.decktd {
|
.decktd {
|
||||||
|
|
@ -72,6 +75,11 @@ body {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
padding-top: 0.2em;
|
padding-top: 0.2em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover .gears {
|
||||||
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nightMode {
|
.nightMode {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
/* Copyright: Ankitects Pty Ltd and contributors
|
/* Copyright: Ankitects Pty Ltd and contributors
|
||||||
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
||||||
|
|
||||||
@use "sass/base";
|
@use "root-vars";
|
||||||
@use "vars";
|
@use "sass/vars" as *;
|
||||||
@use "sass/card-counts";
|
@use "sass/card-counts";
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--focus-color: #{vars.palette-of(border-focus)};
|
--focus-color: #{palette-of(border-focus)};
|
||||||
|
|
||||||
.isMac {
|
.isMac {
|
||||||
--focus-color: rgba(0 103 244 / 0.247);
|
--focus-color: rgba(0 103 244 / 0.247);
|
||||||
|
|
@ -52,11 +52,11 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
:focus {
|
:focus {
|
||||||
outline: 1px auto var(--focus-color);
|
outline: 1px auto color(focus-color);
|
||||||
|
|
||||||
.nightMode & {
|
.nightMode & {
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: 0 0 0 2px var(--focus-color);
|
box-shadow: 0 0 0 2px color(focus-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,13 +75,13 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
#outer {
|
#outer {
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid color(border);
|
||||||
/* Better compatibility with graphics pad/touchscreen */
|
/* Better compatibility with graphics pad/touchscreen */
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nightMode {
|
.nightMode {
|
||||||
#outer {
|
#outer {
|
||||||
border-top-color: var(--border-subtle);
|
border-top-color: color(border-subtle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,22 @@
|
||||||
/* Copyright: Ankitects Pty Ltd and contributors
|
/* Copyright: Ankitects Pty Ltd and contributors
|
||||||
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
||||||
|
|
||||||
@use "sass/base";
|
@use "root-vars";
|
||||||
|
@use "sass/vars" as *;
|
||||||
|
@use "sass/elevation";
|
||||||
|
@use "sass/button-mixins" as button;
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
padding: 3px;
|
padding-bottom: 12px;
|
||||||
font-weight: bold;
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tdcenter {
|
.tdcenter {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
border-radius: prop(border-radius);
|
||||||
|
border-bottom-left-radius: prop(border-radius-large);
|
||||||
|
border-bottom-right-radius: prop(border-radius-large);
|
||||||
|
@include button.base($with-hover: false);
|
||||||
|
@include elevation.elevation(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
@ -25,28 +31,17 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.hitem {
|
.hitem {
|
||||||
padding-right: 12px;
|
font-weight: bold;
|
||||||
padding-left: 12px;
|
margin: 6px 12px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--fg);
|
color: color(fg);
|
||||||
}
|
display: inline-block;
|
||||||
|
|
||||||
.hitem:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hitem:focus {
|
.hitem:focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nightMode #header {
|
|
||||||
border-bottom-color: var(--border-subtle);
|
|
||||||
}
|
|
||||||
|
|
||||||
.isMac.nightMode #header {
|
|
||||||
border-bottom-color: var(--canvas-elevated);
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% {
|
0% {
|
||||||
-webkit-transform: rotate(0deg);
|
-webkit-transform: rotate(0deg);
|
||||||
|
|
@ -57,25 +52,27 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.spin {
|
.spin {
|
||||||
|
width: 16px;
|
||||||
animation: spin;
|
animation: spin;
|
||||||
animation-duration: 2s;
|
animation-duration: 2s;
|
||||||
animation-iteration-count: infinite;
|
animation-iteration-count: infinite;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
animation-timing-function: linear;
|
animation-timing-function: linear;
|
||||||
|
transition: all 0.2s ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sync-spinner {
|
#sync-spinner {
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
height: 16px;
|
||||||
margin-bottom: -3px;
|
margin-bottom: -3px;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.normal-sync {
|
.normal-sync {
|
||||||
color: var(--state-new);
|
color: color(state-new);
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-sync {
|
.full-sync {
|
||||||
color: var(--state-learn);
|
color: color(state-learn);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ class Toolbar:
|
||||||
|
|
||||||
_body = """
|
_body = """
|
||||||
<center id=outer>
|
<center id=outer>
|
||||||
<table id=header width=100%%>
|
<table id=header>
|
||||||
<tr>
|
<tr>
|
||||||
<td class=tdcenter align=center>%s</td>
|
<td class=tdcenter align=center>%s</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@use "vars";
|
@use "vars";
|
||||||
@use "button-mixins" as button;
|
@use "button-mixins" as button;
|
||||||
|
@use "elevation";
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--focus-color: #{vars.palette-of(shadow-focus)};
|
--focus-color: #{vars.palette-of(shadow-focus)};
|
||||||
|
|
@ -23,6 +24,8 @@
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@include button.base;
|
@include button.base;
|
||||||
border-radius: var(--border-radius);
|
@include elevation.elevation(2);
|
||||||
padding: 5px 10px;
|
border-radius: var(--border-radius-large);
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@use "sass/base";
|
@use "root-vars";
|
||||||
@use "sass/button-mixins" as button;
|
@use "sass/button-mixins" as button;
|
||||||
|
|
||||||
label,
|
label,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue