mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
#156 new: setting of textFactor
This commit is contained in:
@@ -38,6 +38,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
final Order<String> _cardsOrder = [];
|
final Order<String> _cardsOrder = [];
|
||||||
final _setting = locator<SettingStore>();
|
final _setting = locator<SettingStore>();
|
||||||
|
|
||||||
|
late final _textFactor = _setting.textFactor.fetch();
|
||||||
|
|
||||||
late final _cardBuildMap = Map.fromIterables(
|
late final _cardBuildMap = Map.fromIterables(
|
||||||
defaultDetailCardOrder,
|
defaultDetailCardOrder,
|
||||||
[
|
[
|
||||||
@@ -163,12 +165,12 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
Text(
|
Text(
|
||||||
'${percent.toStringAsFixed(1)}%',
|
'${percent.toStringAsFixed(1)}%',
|
||||||
style: const TextStyle(fontSize: 13),
|
style: const TextStyle(fontSize: 13),
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
timeType,
|
timeType,
|
||||||
style: const TextStyle(fontSize: 10, color: Colors.grey),
|
style: const TextStyle(fontSize: 10, color: Colors.grey),
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -206,11 +208,11 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(ss.sysVer, style: textSize11, textScaleFactor: 1.0),
|
Text(ss.sysVer, style: textSize11, textScaleFactor: _textFactor),
|
||||||
Text(
|
Text(
|
||||||
ss.uptime,
|
ss.uptime,
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -316,9 +318,9 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
Text(
|
Text(
|
||||||
'${disk.usedPercent}% of ${disk.size}',
|
'${disk.usedPercent}% of ${disk.size}',
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
Text(disk.path, style: textSize11, textScaleFactor: 1.0)
|
Text(disk.path, style: textSize11, textScaleFactor: _textFactor,)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
_buildProgress(disk.usedPercent.toDouble())
|
_buildProgress(disk.usedPercent.toDouble())
|
||||||
@@ -392,7 +394,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
child: Text(
|
child: Text(
|
||||||
device,
|
device,
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -403,7 +405,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
'${ns.speedIn(device: device)} | ${ns.sizeIn(device: device)}',
|
'${ns.speedIn(device: device)} | ${ns.sizeIn(device: device)}',
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
textScaleFactor: 0.87,
|
textScaleFactor: 0.87 * _textFactor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -412,7 +414,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
'${ns.speedOut(device: device)} | ${ns.sizeOut(device: device)}',
|
'${ns.speedOut(device: device)} | ${ns.sizeOut(device: device)}',
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
textScaleFactor: 0.87,
|
textScaleFactor: 0.87 * _textFactor,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -444,12 +446,12 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
Text(
|
Text(
|
||||||
key,
|
key,
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${temps.get(key)}°C',
|
'${temps.get(key)}°C',
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)));
|
)));
|
||||||
@@ -468,7 +470,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
key: key,
|
key: key,
|
||||||
text,
|
text,
|
||||||
style: style,
|
style: style,
|
||||||
textScaleFactor: 1.0,
|
textScaleFactor: _textFactor,
|
||||||
),
|
),
|
||||||
transitionBuilder: (child, animation) => FadeTransition(
|
transitionBuilder: (child, animation) => FadeTransition(
|
||||||
opacity: animation,
|
opacity: animation,
|
||||||
|
|||||||
Reference in New Issue
Block a user