only main window show tabbar border, change cm tabbar color (#9073)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
a31c27be73
commit
bb1b9858d5
@ -83,7 +83,7 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
|||||||
child: Consumer<ServerModel>(
|
child: Consumer<ServerModel>(
|
||||||
builder: (context, serverModel, child) {
|
builder: (context, serverModel, child) {
|
||||||
final body = Scaffold(
|
final body = Scaffold(
|
||||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
backgroundColor: Theme.of(context).colorScheme.background,
|
||||||
body: ConnectionManager(),
|
body: ConnectionManager(),
|
||||||
);
|
);
|
||||||
return isLinux
|
return isLinux
|
||||||
@ -193,8 +193,6 @@ class ConnectionManagerState extends State<ConnectionManager>
|
|||||||
maxLabelWidth: 100,
|
maxLabelWidth: 100,
|
||||||
tail: null, //buildScrollJumper(),
|
tail: null, //buildScrollJumper(),
|
||||||
blockTab: allowRemoteCMModification() ? null : _block,
|
blockTab: allowRemoteCMModification() ? null : _block,
|
||||||
selectedTabBackgroundColor:
|
|
||||||
Theme.of(context).hintColor.withOpacity(0),
|
|
||||||
tabBuilder: (key, icon, label, themeConf) {
|
tabBuilder: (key, icon, label, themeConf) {
|
||||||
final client = serverModel.clients
|
final client = serverModel.clients
|
||||||
.firstWhereOrNull((client) => client.id.toString() == key);
|
.firstWhereOrNull((client) => client.id.toString() == key);
|
||||||
@ -229,7 +227,7 @@ class ConnectionManagerState extends State<ConnectionManager>
|
|||||||
borderWidth;
|
borderWidth;
|
||||||
final realChatPageWidth =
|
final realChatPageWidth =
|
||||||
constrains.maxWidth - realClosedWidth;
|
constrains.maxWidth - realClosedWidth;
|
||||||
return Row(children: [
|
final row = Row(children: [
|
||||||
if (constrains.maxWidth >
|
if (constrains.maxWidth >
|
||||||
kConnectionManagerWindowSizeClosedChat.width)
|
kConnectionManagerWindowSizeClosedChat.width)
|
||||||
Consumer<ChatModel>(
|
Consumer<ChatModel>(
|
||||||
@ -247,6 +245,10 @@ class ConnectionManagerState extends State<ConnectionManager>
|
|||||||
child:
|
child:
|
||||||
SizedBox(width: realClosedWidth, child: pageView)),
|
SizedBox(width: realClosedWidth, child: pageView)),
|
||||||
]);
|
]);
|
||||||
|
return Container(
|
||||||
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
child: row,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -505,17 +505,20 @@ class _DesktopTabState extends State<DesktopTab>
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
if (stateGlobal.showTabBar.isTrue &&
|
if (stateGlobal.showTabBar.isTrue &&
|
||||||
!(kUseCompatibleUiMode && isHideSingleItem())) {
|
!(kUseCompatibleUiMode && isHideSingleItem())) {
|
||||||
|
final showBottomDivider = _showTabBarBottomDivider(tabType);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: _kTabBarHeight,
|
height: _kTabBarHeight,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: _kTabBarHeight - 1,
|
height:
|
||||||
|
showBottomDivider ? _kTabBarHeight - 1 : _kTabBarHeight,
|
||||||
child: _buildBar(),
|
child: _buildBar(),
|
||||||
),
|
),
|
||||||
const Divider(
|
if (showBottomDivider)
|
||||||
height: 1,
|
const Divider(
|
||||||
),
|
height: 1,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -1161,7 +1164,10 @@ class _TabState extends State<_Tab> with RestorationMixin {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: _kTabBarHeight,
|
// _kTabBarHeight also displays normally
|
||||||
|
height: _showTabBarBottomDivider(widget.tabType)
|
||||||
|
? _kTabBarHeight - 1
|
||||||
|
: _kTabBarHeight,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -1414,6 +1420,10 @@ class _TabDropDownButtonState extends State<_TabDropDownButton> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _showTabBarBottomDivider(DesktopTabType tabType) {
|
||||||
|
return tabType == DesktopTabType.main || tabType == DesktopTabType.install;
|
||||||
|
}
|
||||||
|
|
||||||
class TabbarTheme extends ThemeExtension<TabbarTheme> {
|
class TabbarTheme extends ThemeExtension<TabbarTheme> {
|
||||||
final Color? selectedTabIconColor;
|
final Color? selectedTabIconColor;
|
||||||
final Color? unSelectedTabIconColor;
|
final Color? unSelectedTabIconColor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user