opt: card width

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-12 10:46:39 +08:00
parent 226d554249
commit 12a236f397
36 changed files with 92 additions and 61 deletions

View File

@@ -4,7 +4,8 @@ import 'package:flutter/rendering.dart';
import 'storage.dart';
class Grid {
static double maxRowWidth = GStorage.maxRowWidth;
static double mediumCardWidth = GStorage.mediumCardWidth;
static double smallCardWidth = GStorage.smallCardWidth;
//
// static double calculateActualWidth(BuildContext context, double maxCrossAxisExtent, double crossAxisSpacing, {double? screenWidthOffset}) {
// double screenWidth = MediaQuery.of(context).size.width;

View File

@@ -117,8 +117,11 @@ class GStorage {
static int get previewQ =>
setting.get(SettingBoxKey.previewQuality, defaultValue: 80);
static double get maxRowWidth =>
setting.get(SettingBoxKey.maxRowWidth, defaultValue: 280.0);
static double get mediumCardWidth =>
setting.get(SettingBoxKey.mediumCardWidth, defaultValue: 280.0);
static double get smallCardWidth =>
setting.get(SettingBoxKey.smallCardWidth, defaultValue: 240.0);
static UpPanelPosition get upPanelPosition =>
UpPanelPosition.values[setting.get(SettingBoxKey.upPanelPosition,
@@ -589,7 +592,8 @@ class SettingBoxKey {
customColor = 'customColor', // 自定义主题色
enableSingleRow = 'enableSingleRow', // 首页单列
displayMode = 'displayMode',
maxRowWidth = 'maxRowWidth', // 首页列最大宽度dp
mediumCardWidth = 'mediumCardWidth', // 首页列最大宽度dp
smallCardWidth = 'smallCardWidth',
videoPlayerRemoveSafeArea = 'videoPlayerRemoveSafeArea', // 视频播放器移除安全边距
// videoPlayerShowStatusBarBackgroundColor =
// 'videoPlayerShowStatusBarBackgroundColor', // 播放页状态栏显示为背景色