Skip to content

Commit

Permalink
Optimise skipping interval setting ui
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaoMint committed Dec 12, 2023
1 parent 8669004 commit d000ea3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 0 additions & 2 deletions lib/utils/miru_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ class MiruStorage {
await _initSetting(SettingKey.enableNSFW, false);
await _initSetting(SettingKey.videoPlayer, 'built-in');
await _initSetting(SettingKey.listMode, "grid");
await _initSetting(SettingKey.skipInterval, "10000");
await _initSetting(SettingKey.keyI, 10.0);
await _initSetting(SettingKey.keyJ, -10.0);
await _initSetting(SettingKey.arrowLeft, -2.0);
Expand Down Expand Up @@ -147,7 +146,6 @@ class SettingKey {
static String videoPlayer = 'VideoPlayer';
static String databaseVersion = 'DatabaseVersion';
static String listMode = 'ListMode';
static String skipInterval = 'SkipInterval';
static String keyI = 'KeyI';
static String keyJ = 'KeyJ';
static String arrowLeft = 'Arrowleft';
Expand Down
25 changes: 10 additions & 15 deletions lib/views/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,23 +324,18 @@ class _SettingsPageState extends State<SettingsPage> {
const SizedBox(height: 8),
if (!Platform.isAndroid)
fluent.Expander(
header: Row(
leading: const Icon(fluent.FluentIcons.keyboard_classic, size: 24),
header: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Icon(fluent.FluentIcons.keyboard_classic, size: 24),
const SizedBox(width: 16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("settings.skip-interval".i18n),
const SizedBox(height: 2),
Text(
"settings.skip-interval-subtitle".i18n,
style: const TextStyle(fontSize: 12),
)
],
const SizedBox(height: 10),
Text("settings.skip-interval".i18n),
const SizedBox(height: 2),
Text(
"settings.skip-interval-subtitle".i18n,
style: const TextStyle(fontSize: 12),
),
const Spacer(),
const SizedBox(),
const SizedBox(height: 15)
],
),
content: Column(
Expand Down
1 change: 1 addition & 0 deletions lib/views/widgets/settings_numberbox_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class _SettingsIntpuTileState extends fluent.State<SettingNumboxButton> {
mode: fluent.SpinButtonPlacementMode.inline,
),
)),
const SizedBox(width: 8),
if (!buttonSwitch)
fluent.Button(
child: Text(widget.button1text),
Expand Down

0 comments on commit d000ea3

Please sign in to comment.