change active monitor style
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
2c1f948832
commit
009c088a64
@ -604,7 +604,8 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
|
|
||||||
Widget buildMonitorMenu() {
|
Widget buildMonitorMenu() {
|
||||||
final width = SimpleWrapper<double>(0);
|
final width = SimpleWrapper<double>(0);
|
||||||
final monitorsIcon = globalMonitorsWidget(width);
|
final monitorsIcon =
|
||||||
|
globalMonitorsWidget(width, Colors.white, Colors.black38);
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
tooltip: 'Select Monitor',
|
tooltip: 'Select Monitor',
|
||||||
icon: monitorsIcon,
|
icon: monitorsIcon,
|
||||||
@ -670,7 +671,8 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
final width = SimpleWrapper<double>(0);
|
final width = SimpleWrapper<double>(0);
|
||||||
Widget? monitorsIcon;
|
Widget? monitorsIcon;
|
||||||
if (isAllMonitors) {
|
if (isAllMonitors) {
|
||||||
monitorsIcon = globalMonitorsWidget(width);
|
monitorsIcon = globalMonitorsWidget(
|
||||||
|
width, Colors.white, _ToolbarTheme.blueColor);
|
||||||
}
|
}
|
||||||
return _IconMenuButton(
|
return _IconMenuButton(
|
||||||
tooltip: isMulti
|
tooltip: isMulti
|
||||||
@ -719,7 +721,8 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
return monitorList;
|
return monitorList;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalMonitorsWidget(SimpleWrapper<double> width) {
|
globalMonitorsWidget(
|
||||||
|
SimpleWrapper<double> width, Color activeTextColor, Color activeBgColor) {
|
||||||
getMonitors() {
|
getMonitors() {
|
||||||
final pi = ffi.ffiModel.pi;
|
final pi = ffi.ffiModel.pi;
|
||||||
RxInt display = CurrentDisplayState.find(id);
|
RxInt display = CurrentDisplayState.find(id);
|
||||||
@ -728,7 +731,7 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
return Offstage();
|
return Offstage();
|
||||||
}
|
}
|
||||||
|
|
||||||
final scale = _ToolbarTheme.buttonSize/ rect.height * 0.75;
|
final scale = _ToolbarTheme.buttonSize / rect.height * 0.75;
|
||||||
final startY = (_ToolbarTheme.buttonSize - rect.height * scale) * 0.5;
|
final startY = (_ToolbarTheme.buttonSize - rect.height * scale) * 0.5;
|
||||||
final startX = startY;
|
final startX = startY;
|
||||||
|
|
||||||
@ -750,15 +753,14 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
// to-do: theme
|
color: display.value == i ? activeBgColor : Colors.white,
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${i + 1}',
|
'${i + 1}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: display.value == i
|
color: display.value == i
|
||||||
? _ToolbarTheme.blueColor
|
? activeTextColor
|
||||||
: _ToolbarTheme.inactiveColor,
|
: _ToolbarTheme.inactiveColor,
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user