rm: linux dist logos

This commit is contained in:
lollipopkit
2023-06-05 16:50:22 +08:00
parent d2cdbe4774
commit 378baf589a
17 changed files with 119 additions and 124 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -10,10 +10,6 @@ enum Dist {
arch,
alpine,
rocky;
String get iconPath {
return 'assets/linux/$name.png';
}
}
extension StringX on String {

View File

@@ -14,6 +14,7 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
notifyListeners();
}
}
bool _alt = false;
bool get alt => _alt;
set alt(bool value) {

View File

@@ -4,7 +4,6 @@ import 'package:provider/provider.dart';
import 'package:toolbox/core/extension/order.dart';
import 'package:toolbox/data/model/server/cpu.dart';
import 'package:toolbox/data/model/server/disk.dart';
import 'package:toolbox/data/model/server/dist.dart';
import 'package:toolbox/data/model/server/memory.dart';
import 'package:toolbox/data/model/server/temp.dart';
@@ -77,7 +76,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
_cardsOrder.move(oldIndex, newIndex, _setting.detailCardOrder);
});
},
header: _buildLinuxIcon(si.status.sysVer),
footer: height13,
children: _buildMainList(si.status),
),
@@ -102,23 +100,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
.toList();
}
Widget _buildLinuxIcon(String sysVer) {
if (!_setting.showDistLogo.fetch()!) return placeholder;
final iconPath = sysVer.dist?.iconPath;
if (iconPath == null) return placeholder;
return ConstrainedBox(
constraints: BoxConstraints(
maxHeight: _media.size.height * 0.13,
maxWidth: _media.size.width * 0.6,
),
child: Image.asset(
iconPath,
fit: BoxFit.contain,
semanticLabel: _s.showDistLogo,
),
);
}
Widget _buildCPUView(Cpus cs) {
return RoundRectCard(
Padding(

View File

@@ -305,7 +305,9 @@ class _SettingPageState extends State<SettingPage> {
onTap: () {
startPageKey.currentState?.showButtonMenu();
},
trailing: ValueBuilder(listenable: _launchPageIdx, build: () => PopupMenuButton(
trailing: ValueBuilder(
listenable: _launchPageIdx,
build: () => PopupMenuButton(
key: startPageKey,
itemBuilder: (BuildContext context) => items,
initialValue: _launchPageIdx.value,
@@ -314,7 +316,8 @@ class _SettingPageState extends State<SettingPage> {
_setting.launchPage.put(_launchPageIdx.value);
},
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: _media.size.width * 0.35),
constraints:
BoxConstraints(maxWidth: _media.size.width * 0.35),
child: Text(
tabTitleName(context, AppTab.values[_launchPageIdx.value]),
textAlign: TextAlign.right,
@@ -346,7 +349,8 @@ class _SettingPageState extends State<SettingPage> {
onTap: () {
maxRetryKey.currentState?.showButtonMenu();
},
trailing: ValueBuilder(build: () => PopupMenuButton(
trailing: ValueBuilder(
build: () => PopupMenuButton(
key: maxRetryKey,
itemBuilder: (BuildContext context) => items,
initialValue: _maxRetryCount.value,
@@ -358,7 +362,9 @@ class _SettingPageState extends State<SettingPage> {
'${_maxRetryCount.value} ${_s.times}',
style: textSize15,
),
), listenable: _maxRetryCount,),
),
listenable: _maxRetryCount,
),
);
}
@@ -382,7 +388,9 @@ class _SettingPageState extends State<SettingPage> {
onTap: () {
themeKey.currentState?.showButtonMenu();
},
trailing: ValueBuilder(listenable: _nightMode, build: () => PopupMenuButton(
trailing: ValueBuilder(
listenable: _nightMode,
build: () => PopupMenuButton(
key: themeKey,
itemBuilder: (BuildContext context) => items,
initialValue: _nightMode.value,
@@ -394,7 +402,8 @@ class _SettingPageState extends State<SettingPage> {
_buildThemeModeStr(_nightMode.value),
style: textSize15,
),
),),
),
),
);
}
@@ -516,14 +525,17 @@ class _SettingPageState extends State<SettingPage> {
}
Widget _buildTermFontSize() {
return ValueBuilder(listenable: _fontSize, build: () => ListTile(
return ValueBuilder(
listenable: _fontSize,
build: () => ListTile(
title: Text(_s.fontSize),
trailing: Text(
_fontSize.value.toString(),
style: textSize15,
),
onTap: () {
final ctrller = TextEditingController(text: _fontSize.value.toString());
final ctrller =
TextEditingController(text: _fontSize.value.toString());
showRoundDialog(
context: context,
title: Text(_s.fontSize),
@@ -549,7 +561,8 @@ class _SettingPageState extends State<SettingPage> {
],
);
},
),);
),
);
}
Widget _buildDiskIgnorePath() {
@@ -602,7 +615,9 @@ class _SettingPageState extends State<SettingPage> {
onTap: () {
localeKey.currentState?.showButtonMenu();
},
trailing: ValueBuilder(listenable: _localeCode, build: () => PopupMenuButton(
trailing: ValueBuilder(
listenable: _localeCode,
build: () => PopupMenuButton(
key: localeKey,
itemBuilder: (BuildContext context) => items,
initialValue: _localeCode.value,
@@ -638,7 +653,9 @@ class _SettingPageState extends State<SettingPage> {
).toList();
return ListTile(
title: Text("${_s.editor} ${_s.theme}"),
trailing: ValueBuilder(listenable: _editorTheme, build: () => PopupMenuButton(
trailing: ValueBuilder(
listenable: _editorTheme,
build: () => PopupMenuButton(
key: editorThemeKey,
itemBuilder: (BuildContext context) => items,
initialValue: _editorTheme.value,
@@ -650,7 +667,8 @@ class _SettingPageState extends State<SettingPage> {
_editorTheme.value,
style: textSize15,
),
),),
),
),
onTap: () {
editorThemeKey.currentState?.showButtonMenu();
},

View File

@@ -95,7 +95,6 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/app_icon.png
- assets/linux/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see