refactor(desktop): reorganize workspace panels and navigation
This commit is contained in:
1 parent
826745b407
commit
1f73765745
92 files changed
+5811
-2650
No files matched your search
@@ -103,6 +103,17 @@ abstract final class AppTheme {
|
||||
_ => 'sans-serif',
|
||||
};
|
||||
|
||||
static List<String> systemFontFamilyFallback(TargetPlatform platform) =>
|
||||
switch (platform) {
|
||||
TargetPlatform.windows => const [
|
||||
'Microsoft YaHei UI',
|
||||
'Microsoft YaHei',
|
||||
'Noto Sans CJK SC',
|
||||
'sans-serif',
|
||||
],
|
||||
_ => const ['PingFang SC', 'Noto Sans CJK SC', 'sans-serif'],
|
||||
};
|
||||
|
||||
static Color popoverBackground(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return theme.extension<AppSurfaces>()?.popoverBackground ??
|
||||
@@ -678,11 +689,7 @@ abstract final class AppTheme {
|
||||
useMaterial3: true,
|
||||
colorScheme: colors,
|
||||
fontFamily: systemFontFamily(defaultTargetPlatform),
|
||||
fontFamilyFallback: const [
|
||||
'PingFang SC',
|
||||
'Noto Sans CJK SC',
|
||||
'sans-serif',
|
||||
],
|
||||
fontFamilyFallback: systemFontFamilyFallback(defaultTargetPlatform),
|
||||
textTheme: text,
|
||||
primaryTextTheme: text,
|
||||
scaffoldBackgroundColor: palette.background,
|
||||
@@ -956,21 +963,11 @@ abstract final class AppTheme {
|
||||
}) => TextStyle(
|
||||
inherit: false,
|
||||
fontFamily: systemFontFamily(defaultTargetPlatform),
|
||||
fontFamilyFallback: const [
|
||||
'PingFang SC',
|
||||
'Noto Sans CJK SC',
|
||||
'sans-serif',
|
||||
],
|
||||
fontFamilyFallback: systemFontFamilyFallback(defaultTargetPlatform),
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
fontSize: size,
|
||||
height: lineHeight / size,
|
||||
fontWeight: weight,
|
||||
fontVariations: [
|
||||
FontVariation(
|
||||
'wght',
|
||||
weight == FontWeight.w400 ? 430 : weight.value.toDouble(),
|
||||
),
|
||||
],
|
||||
letterSpacing: 0,
|
||||
color: color ?? palette.foreground,
|
||||
);
|
||||
@@ -1199,16 +1196,12 @@ abstract final class AppSidebarTypography {
|
||||
Color? color,
|
||||
}) => TextStyle(
|
||||
fontFamily: AppTheme.systemFontFamily(Theme.of(context).platform),
|
||||
fontFamilyFallback: const ['PingFang SC', 'Noto Sans CJK SC', 'sans-serif'],
|
||||
fontFamilyFallback: AppTheme.systemFontFamilyFallback(
|
||||
Theme.of(context).platform,
|
||||
),
|
||||
fontSize: fontSize,
|
||||
height: height,
|
||||
fontWeight: weight,
|
||||
fontVariations: [
|
||||
FontVariation(
|
||||
'wght',
|
||||
weight == FontWeight.w400 ? 430 : weight.value.toDouble(),
|
||||
),
|
||||
],
|
||||
color: color ?? AppSidebarColors.of(context).primary,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user