mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix deck config input's background color in Qt5 (#3243)
This commit is contained in:
parent
e41c4573d7
commit
9dc3b10fe9
3 changed files with 24 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
||||||
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
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { pageTheme } from "$lib/sveltelib/theme";
|
||||||
|
|
||||||
const rtl: boolean = window.getComputedStyle(document.body).direction == "rtl";
|
const rtl: boolean = window.getComputedStyle(document.body).direction == "rtl";
|
||||||
|
|
||||||
export let grow = true;
|
export let grow = true;
|
||||||
|
@ -11,6 +13,7 @@
|
||||||
<div
|
<div
|
||||||
class="config-input position-relative justify-content-end"
|
class="config-input position-relative justify-content-end"
|
||||||
class:flex-grow-1={grow}
|
class:flex-grow-1={grow}
|
||||||
|
class:nightMode={$pageTheme.isDark}
|
||||||
>
|
>
|
||||||
<div class="revert" class:rtl>
|
<div class="revert" class:rtl>
|
||||||
<slot name="revert" />
|
<slot name="revert" />
|
||||||
|
@ -39,5 +42,9 @@
|
||||||
.revert:hover {
|
.revert:hover {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
&.nightMode :global(input),
|
||||||
|
&.nightMode :global(textarea) {
|
||||||
|
background-color: rgb(59, 59, 59);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -27,6 +27,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import Warning from "./Warning.svelte";
|
import Warning from "./Warning.svelte";
|
||||||
import WeightsInputRow from "./WeightsInputRow.svelte";
|
import WeightsInputRow from "./WeightsInputRow.svelte";
|
||||||
|
import WeightsSearchRow from "./WeightsSearchRow.svelte";
|
||||||
|
|
||||||
export let state: DeckOptionsState;
|
export let state: DeckOptionsState;
|
||||||
export let openHelpModal: (String) => void;
|
export let openHelpModal: (String) => void;
|
||||||
|
@ -281,11 +282,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</SettingTitle>
|
</SettingTitle>
|
||||||
</WeightsInputRow>
|
</WeightsInputRow>
|
||||||
|
|
||||||
<input
|
<WeightsSearchRow
|
||||||
bind:value={$config.weightSearch}
|
bind:value={$config.weightSearch}
|
||||||
placeholder={defaultWeightSearch}
|
placeholder={defaultWeightSearch}
|
||||||
class="w-100 mb-1"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DateInput bind:date={$config.ignoreRevlogsBeforeDate}>
|
<DateInput bind:date={$config.ignoreRevlogsBeforeDate}>
|
||||||
<SettingTitle on:click={() => openHelpModal("ignoreBefore")}>
|
<SettingTitle on:click={() => openHelpModal("ignoreBefore")}>
|
||||||
{tr.deckConfigIgnoreBefore()}
|
{tr.deckConfigIgnoreBefore()}
|
||||||
|
|
14
ts/routes/deck-options/WeightsSearchRow.svelte
Normal file
14
ts/routes/deck-options/WeightsSearchRow.svelte
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!--
|
||||||
|
Copyright: Ankitects Pty Ltd and contributors
|
||||||
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
-->
|
||||||
|
<script lang="ts">
|
||||||
|
import ConfigInput from "$lib/components/ConfigInput.svelte";
|
||||||
|
|
||||||
|
export let value: string;
|
||||||
|
export let placeholder: string;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<ConfigInput>
|
||||||
|
<input bind:value {placeholder} class="w-100 mb-1" />
|
||||||
|
</ConfigInput>
|
Loading…
Reference in a new issue