fix(hotkeys): suppress single-key hotkeys while typing in LineEdit fields
The window-level hotkey handler only suppressed single-key shortcuts (Space/q/?/1-5) when UiFocusState.text-input-focused was set. The ~24 std-widget LineEdit fields across 14 modals/settings never set it, so those keys fired (and were swallowed) mid-typing. Each now mirrors its focus via `changed has-focus`; import added where missing. cc
This commit is contained in:
14 files changed
+37
-13
No files matched your search
@@ -12,7 +12,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { MyQbzCreateState, MyQbzCreateActions } from "../state.slint";
|
import { MyQbzCreateState, MyQbzCreateActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { QbzPrimaryButton } from "../primitives/QbzPrimaryButton.slint";
|
import { QbzPrimaryButton } from "../primitives/QbzPrimaryButton.slint";
|
||||||
import { SecondaryButton } from "../primitives/SecondaryButton.slint";
|
import { SecondaryButton } from "../primitives/SecondaryButton.slint";
|
||||||
@@ -125,6 +125,7 @@ export component CreateMyQbzModal inherits Rectangle {
|
|||||||
}
|
}
|
||||||
name-input := LineEdit {
|
name-input := LineEdit {
|
||||||
text <=> MyQbzCreateState.name;
|
text <=> MyQbzCreateState.name;
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
accepted => {
|
accepted => {
|
||||||
MyQbzCreateActions.submit();
|
MyQbzCreateActions.submit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { MyQbzEditState, MyQbzEditActions } from "../state.slint";
|
import { MyQbzEditState, MyQbzEditActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { QbzPrimaryButton } from "../primitives/QbzPrimaryButton.slint";
|
import { QbzPrimaryButton } from "../primitives/QbzPrimaryButton.slint";
|
||||||
import { SecondaryButton } from "../primitives/SecondaryButton.slint";
|
import { SecondaryButton } from "../primitives/SecondaryButton.slint";
|
||||||
@@ -74,6 +74,7 @@ export component MyQbzEditModal inherits Rectangle {
|
|||||||
// --- Body: rename (name input) ---------------------------
|
// --- Body: rename (name input) ---------------------------
|
||||||
if root.is-rename: rename-input := LineEdit {
|
if root.is-rename: rename-input := LineEdit {
|
||||||
text <=> MyQbzEditState.draft-name;
|
text <=> MyQbzEditState.draft-name;
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
accepted => {
|
accepted => {
|
||||||
if (root.can-submit) {
|
if (root.can-submit) {
|
||||||
MyQbzEditActions.submit-rename();
|
MyQbzEditActions.submit-rename();
|
||||||
|
|||||||
@@ -823,6 +823,7 @@ component PmListRow inherits Rectangle {
|
|||||||
height: 28px;
|
height: 28px;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
placeholder-text: @tr("Search folders");
|
placeholder-text: @tr("Search folders");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> root.folder-query;
|
text <=> root.folder-query;
|
||||||
edited => {
|
edited => {
|
||||||
PlaylistManagerActions.search-folders(self.text);
|
PlaylistManagerActions.search-folders(self.text);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { CreateFolderState, CreateFolderActions } from "../state.slint";
|
import { CreateFolderState, CreateFolderActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "QbzIcon.slint";
|
import { QbzIcon } from "QbzIcon.slint";
|
||||||
import { LineEdit } from "std-widgets.slint";
|
import { LineEdit } from "std-widgets.slint";
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ export component CreateFolderModal inherits Rectangle {
|
|||||||
|
|
||||||
name-input := LineEdit {
|
name-input := LineEdit {
|
||||||
placeholder-text: @tr("Folder name");
|
placeholder-text: @tr("Folder name");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> CreateFolderState.name;
|
text <=> CreateFolderState.name;
|
||||||
accepted => {
|
accepted => {
|
||||||
CreateFolderActions.submit();
|
CreateFolderActions.submit();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { CreatePlaylistState, CreatePlaylistActions } from "../state.slint";
|
import { CreatePlaylistState, CreatePlaylistActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "QbzIcon.slint";
|
import { QbzIcon } from "QbzIcon.slint";
|
||||||
import { QbzSelect } from "QbzSelect.slint";
|
import { QbzSelect } from "QbzSelect.slint";
|
||||||
import { LineEdit, TextEdit } from "std-widgets.slint";
|
import { LineEdit, TextEdit } from "std-widgets.slint";
|
||||||
@@ -79,6 +79,7 @@ export component CreatePlaylistModal inherits Rectangle {
|
|||||||
}
|
}
|
||||||
name-input := LineEdit {
|
name-input := LineEdit {
|
||||||
placeholder-text: @tr("My Playlist");
|
placeholder-text: @tr("My Playlist");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> CreatePlaylistState.name;
|
text <=> CreatePlaylistState.name;
|
||||||
accepted => {
|
accepted => {
|
||||||
CreatePlaylistActions.submit();
|
CreatePlaylistActions.submit();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { EditPlaylistState, EditPlaylistActions } from "../state.slint";
|
import { EditPlaylistState, EditPlaylistActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "QbzIcon.slint";
|
import { QbzIcon } from "QbzIcon.slint";
|
||||||
import { LineEdit, TextEdit } from "std-widgets.slint";
|
import { LineEdit, TextEdit } from "std-widgets.slint";
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ export component EditPlaylistModal inherits Rectangle {
|
|||||||
|
|
||||||
name-input := LineEdit {
|
name-input := LineEdit {
|
||||||
placeholder-text: @tr("Playlist name");
|
placeholder-text: @tr("Playlist name");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> EditPlaylistState.name;
|
text <=> EditPlaylistState.name;
|
||||||
accepted => {
|
accepted => {
|
||||||
EditPlaylistActions.save();
|
EditPlaylistActions.save();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { FolderEditState, FolderEditActions, PmIconPreset, PmColorSwatch } from "../state.slint";
|
import { FolderEditState, FolderEditActions, PmIconPreset, PmColorSwatch , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "QbzIcon.slint";
|
import { QbzIcon } from "QbzIcon.slint";
|
||||||
import { QbzToggle } from "QbzToggle.slint";
|
import { QbzToggle } from "QbzToggle.slint";
|
||||||
import { LineEdit } from "std-widgets.slint";
|
import { LineEdit } from "std-widgets.slint";
|
||||||
@@ -76,6 +76,7 @@ export component FolderEditModal inherits Rectangle {
|
|||||||
}
|
}
|
||||||
name-input := LineEdit {
|
name-input := LineEdit {
|
||||||
placeholder-text: @tr("Enter folder name");
|
placeholder-text: @tr("Enter folder name");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> FolderEditState.name;
|
text <=> FolderEditState.name;
|
||||||
accepted => { FolderEditActions.save(); }
|
accepted => { FolderEditActions.save(); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { TagEditorState, TagEditorActions } from "../state.slint";
|
import { TagEditorState, TagEditorActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "QbzIcon.slint";
|
import { QbzIcon } from "QbzIcon.slint";
|
||||||
import { QbzSelect } from "QbzSelect.slint";
|
import { QbzSelect } from "QbzSelect.slint";
|
||||||
import { LoadingSpinner } from "LoadingSpinner.slint";
|
import { LoadingSpinner } from "LoadingSpinner.slint";
|
||||||
@@ -96,6 +96,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: @tr("Album title");
|
placeholder-text: @tr("Album title");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> TagEditorState.album_title;
|
text <=> TagEditorState.album_title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,6 +105,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: @tr("Album artist");
|
placeholder-text: @tr("Album artist");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> TagEditorState.album_artist;
|
text <=> TagEditorState.album_artist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,6 +119,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: "—";
|
placeholder-text: "—";
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> TagEditorState.year_input;
|
text <=> TagEditorState.year_input;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,6 +128,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: @tr("Genre");
|
placeholder-text: @tr("Genre");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> TagEditorState.genre;
|
text <=> TagEditorState.genre;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,6 +137,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: "—";
|
placeholder-text: "—";
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> TagEditorState.catalog_number;
|
text <=> TagEditorState.catalog_number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -362,6 +367,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
width: 52px;
|
width: 52px;
|
||||||
placeholder-text: "#";
|
placeholder-text: "#";
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text: row.track_number;
|
text: row.track_number;
|
||||||
edited(t) => {
|
edited(t) => {
|
||||||
TagEditorState.tracks[i].track_number = t;
|
TagEditorState.tracks[i].track_number = t;
|
||||||
@@ -371,6 +377,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
horizontal-stretch: 1;
|
horizontal-stretch: 1;
|
||||||
placeholder-text: @tr("Title");
|
placeholder-text: @tr("Title");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text: row.title;
|
text: row.title;
|
||||||
edited(t) => {
|
edited(t) => {
|
||||||
TagEditorState.tracks[i].title = t;
|
TagEditorState.tracks[i].title = t;
|
||||||
@@ -380,6 +387,7 @@ export component TagEditorModal inherits Rectangle {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
width: 52px;
|
width: 52px;
|
||||||
placeholder-text: @tr("Disc");
|
placeholder-text: @tr("Disc");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text: row.disc_number;
|
text: row.disc_number;
|
||||||
edited(t) => {
|
edited(t) => {
|
||||||
TagEditorState.tracks[i].disc_number = t;
|
TagEditorState.tracks[i].disc_number = t;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { Theme } from "../foundation/semantic-colors.slint";
|
|||||||
import { ThemeState } from "../foundation/theme-state.slint";
|
import { ThemeState } from "../foundation/theme-state.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { AppearanceState, SidebarState, ShellState, ToastState, MyQbzBrandingState } from "../state.slint";
|
import { AppearanceState, SidebarState, ShellState, ToastState, MyQbzBrandingState , UiFocusState } from "../state.slint";
|
||||||
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
||||||
import { QbzSelect } from "../primitives/QbzSelect.slint";
|
import { QbzSelect } from "../primitives/QbzSelect.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
@@ -365,6 +365,7 @@ export component AppearanceSettings inherits VerticalLayout {
|
|||||||
name-edit := LineEdit {
|
name-edit := LineEdit {
|
||||||
text: MyQbzBrandingState.label;
|
text: MyQbzBrandingState.label;
|
||||||
placeholder-text: @tr("My QBZ");
|
placeholder-text: @tr("My QBZ");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
edited(s) => {
|
edited(s) => {
|
||||||
MyQbzBrandingState.set-label(s);
|
MyQbzBrandingState.set-label(s);
|
||||||
}
|
}
|
||||||
@@ -490,6 +491,7 @@ export component AppearanceSettings inherits VerticalLayout {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
text: AppearanceState.window-title-template;
|
text: AppearanceState.window-title-template;
|
||||||
placeholder-text: "{artist} - {track}";
|
placeholder-text: "{artist} - {track}";
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
edited(s) => {
|
edited(s) => {
|
||||||
AppearanceState.window-title-template = s;
|
AppearanceState.window-title-template = s;
|
||||||
AppearanceState.appearance-text("window-title-template", s);
|
AppearanceState.appearance-text("window-title-template", s);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { ScrobbleState, ScrobbleActions, DiscordState, SettingsState } from "../state.slint";
|
import { ScrobbleState, ScrobbleActions, DiscordState, SettingsState , UiFocusState } from "../state.slint";
|
||||||
import { SettingRow } from "SettingRow.slint";
|
import { SettingRow } from "SettingRow.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
||||||
@@ -258,6 +258,7 @@ export component IntegrationsSettings inherits VerticalLayout {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
text: ScrobbleState.listenbrainz-token-input;
|
text: ScrobbleState.listenbrainz-token-input;
|
||||||
placeholder-text: @tr("ListenBrainz token");
|
placeholder-text: @tr("ListenBrainz token");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
input-type: password;
|
input-type: password;
|
||||||
enabled: !ScrobbleState.listenbrainz-busy;
|
enabled: !ScrobbleState.listenbrainz-busy;
|
||||||
edited(s) => {
|
edited(s) => {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { LibFolderEditState, LibraryManageActions } from "../state.slint";
|
import { LibFolderEditState, LibraryManageActions , UiFocusState } from "../state.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
import { QbzToggle } from "../primitives/QbzToggle.slint";
|
||||||
import { QbzSelect } from "../primitives/QbzSelect.slint";
|
import { QbzSelect } from "../primitives/QbzSelect.slint";
|
||||||
@@ -192,6 +192,7 @@ export component LibFolderEditModal inherits Rectangle {
|
|||||||
label: @tr("Display name");
|
label: @tr("Display name");
|
||||||
LineEdit {
|
LineEdit {
|
||||||
placeholder-text: @tr("Optional friendly name");
|
placeholder-text: @tr("Optional friendly name");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> LibFolderEditState.alias;
|
text <=> LibFolderEditState.alias;
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { Theme } from "../foundation/semantic-colors.slint";
|
import { Theme } from "../foundation/semantic-colors.slint";
|
||||||
import { Typography } from "../foundation/typography.slint";
|
import { Typography } from "../foundation/typography.slint";
|
||||||
import { Radius } from "../foundation/radius.slint";
|
import { Radius } from "../foundation/radius.slint";
|
||||||
import { LibraryFoldersState, LibraryManageActions, LibraryScanState, PlexSettingsState, PlexAuthActions } from "../state.slint";
|
import { LibraryFoldersState, LibraryManageActions, LibraryScanState, PlexSettingsState, PlexAuthActions , UiFocusState } from "../state.slint";
|
||||||
import { SettingRow } from "SettingRow.slint";
|
import { SettingRow } from "SettingRow.slint";
|
||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { QbzCheckbox } from "../primitives/QbzCheckbox.slint";
|
import { QbzCheckbox } from "../primitives/QbzCheckbox.slint";
|
||||||
@@ -537,6 +537,7 @@ export component LocalLibrarySettings inherits VerticalLayout {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
text: PlexSettingsState.server-url;
|
text: PlexSettingsState.server-url;
|
||||||
placeholder-text: @tr("http://127.0.0.1:32400");
|
placeholder-text: @tr("http://127.0.0.1:32400");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
edited(s) => {
|
edited(s) => {
|
||||||
PlexSettingsState.server-url = s;
|
PlexSettingsState.server-url = s;
|
||||||
}
|
}
|
||||||
@@ -639,6 +640,7 @@ export component LocalLibrarySettings inherits VerticalLayout {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
text: PlexSettingsState.token-input;
|
text: PlexSettingsState.token-input;
|
||||||
placeholder-text: @tr("X-Plex-Token");
|
placeholder-text: @tr("X-Plex-Token");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
input-type: password;
|
input-type: password;
|
||||||
edited(s) => {
|
edited(s) => {
|
||||||
PlexSettingsState.token-input = s;
|
PlexSettingsState.token-input = s;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { QbzIcon } from "../primitives/QbzIcon.slint";
|
|||||||
import { SidebarPlaylistCollage } from "../primitives/SidebarPlaylistCollage.slint";
|
import { SidebarPlaylistCollage } from "../primitives/SidebarPlaylistCollage.slint";
|
||||||
import { ContextMenu } from "../primitives/ContextMenu.slint";
|
import { ContextMenu } from "../primitives/ContextMenu.slint";
|
||||||
import { ContextMenuItem } from "../primitives/ContextMenuItem.slint";
|
import { ContextMenuItem } from "../primitives/ContextMenuItem.slint";
|
||||||
import { ShellState, SidebarState, SidebarActions, SidebarEntry, DragState, HeaderMenuState, NavMenuEntry, SidebarFolderPopupState, SidebarTooltipState, MyQbzBrandingState, OfflineState, NavState, ContentView, AppearanceState, SettingsState } from "../state.slint";
|
import { ShellState, SidebarState, SidebarActions, SidebarEntry, DragState, HeaderMenuState, NavMenuEntry, SidebarFolderPopupState, SidebarTooltipState, MyQbzBrandingState, OfflineState, NavState, ContentView, AppearanceState, SettingsState , UiFocusState } from "../state.slint";
|
||||||
import { ScrollView, LineEdit } from "std-widgets.slint";
|
import { ScrollView, LineEdit } from "std-widgets.slint";
|
||||||
|
|
||||||
// A single context-menu item row.
|
// A single context-menu item row.
|
||||||
@@ -485,6 +485,7 @@ component SidebarRow inherits Rectangle {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
placeholder-text: @tr("Search folders");
|
placeholder-text: @tr("Search folders");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> root.folder-query;
|
text <=> root.folder-query;
|
||||||
edited => {
|
edited => {
|
||||||
SidebarActions.search-folders(self.text);
|
SidebarActions.search-folders(self.text);
|
||||||
@@ -828,6 +829,7 @@ export component Sidebar inherits Rectangle {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
placeholder-text: @tr("Search playlists");
|
placeholder-text: @tr("Search playlists");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> SidebarState.search-query;
|
text <=> SidebarState.search-query;
|
||||||
edited => {
|
edited => {
|
||||||
SidebarActions.search-changed(self.text);
|
SidebarActions.search-changed(self.text);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { Radius } from "../foundation/radius.slint";
|
|||||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||||
import { ListScrollbar } from "../primitives/ListScrollbar.slint";
|
import { ListScrollbar } from "../primitives/ListScrollbar.slint";
|
||||||
import { LineEdit } from "std-widgets.slint";
|
import { LineEdit } from "std-widgets.slint";
|
||||||
import { SidebarPlaylistsPopupState, SidebarState, SidebarActions, SidebarEntry, OfflineState } from "../state.slint";
|
import { SidebarPlaylistsPopupState, SidebarState, SidebarActions, SidebarEntry, OfflineState , UiFocusState } from "../state.slint";
|
||||||
|
|
||||||
// One entry row — a folder (bold, toggles expand) or a playlist (opens it).
|
// One entry row — a folder (bold, toggles expand) or a playlist (opens it).
|
||||||
component PpRow inherits Rectangle {
|
component PpRow inherits Rectangle {
|
||||||
@@ -130,6 +130,7 @@ export component SidebarPlaylistsPopup inherits Rectangle {
|
|||||||
width: parent.width - 16px;
|
width: parent.width - 16px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
placeholder-text: @tr("Search playlists");
|
placeholder-text: @tr("Search playlists");
|
||||||
|
changed has-focus => { UiFocusState.text-input-focused = self.has-focus; }
|
||||||
text <=> SidebarState.search-query;
|
text <=> SidebarState.search-query;
|
||||||
edited => {
|
edited => {
|
||||||
SidebarActions.search-changed(self.text);
|
SidebarActions.search-changed(self.text);
|
||||||
|
|||||||
Reference in new issue
Block a user