mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
cache window size/pos
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -136,7 +136,9 @@ abstract class SettingBoxKey {
|
||||
showFsLockBtn = 'showFsLockBtn',
|
||||
silentDownImg = 'silentDownImg',
|
||||
showMemberShop = 'showMemberShop',
|
||||
minimizeOnExit = 'minimizeOnExit';
|
||||
minimizeOnExit = 'minimizeOnExit',
|
||||
windowSize = 'windowSize',
|
||||
windowPosition = 'windowPosition';
|
||||
|
||||
static const String subtitlePreferenceV2 = 'subtitlePreferenceV2',
|
||||
enableDragSubtitle = 'enableDragSubtitle',
|
||||
|
||||
@@ -815,4 +815,12 @@ abstract class Pref {
|
||||
|
||||
static bool get minimizeOnExit =>
|
||||
_setting.get(SettingBoxKey.minimizeOnExit, defaultValue: true);
|
||||
|
||||
static List<double> get windowSize => _setting.get(
|
||||
SettingBoxKey.windowSize,
|
||||
defaultValue: const [1180.0, 720.0],
|
||||
);
|
||||
|
||||
static List<double>? get windowPosition =>
|
||||
_setting.get(SettingBoxKey.windowPosition);
|
||||
}
|
||||
|
||||
@@ -115,15 +115,15 @@ abstract class Utils {
|
||||
);
|
||||
}
|
||||
|
||||
static void copyText(
|
||||
static Future<void> copyText(
|
||||
String text, {
|
||||
bool needToast = true,
|
||||
String? toastText,
|
||||
}) {
|
||||
Clipboard.setData(ClipboardData(text: text));
|
||||
if (needToast) {
|
||||
SmartDialog.showToast(toastText ?? '已复制');
|
||||
}
|
||||
return Clipboard.setData(ClipboardData(text: text));
|
||||
}
|
||||
|
||||
static String makeHeroTag(v) {
|
||||
|
||||
Reference in New Issue
Block a user