opt: titlebar height autofit

Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
Kingtous 2022-06-02 14:51:09 +08:00
parent aefc968246
commit 1f9655d632
3 changed files with 48 additions and 55 deletions

View File

@ -64,9 +64,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
animationDuration: Duration.zero,
child: Column(
children: [
SizedBox(
height: 50,
child: DesktopTitleBar(
DesktopTitleBar(
child: TabBar(
isScrollable: true,
labelColor: Colors.white,
@ -95,7 +93,6 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
))
.toList()),
),
),
Expanded(
child: TabBarView(
children: connectionIds

View File

@ -19,8 +19,6 @@ class _DesktopHomePageState extends State<DesktopHomePage> {
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
Row(
children: [
DesktopTitleBar(
child: Center(
@ -32,8 +30,6 @@ class _DesktopHomePageState extends State<DesktopHomePage> {
fontWeight: FontWeight.bold),
),
),
)
],
),
Expanded(
child: Container(

View File

@ -12,8 +12,7 @@ class DesktopTitleBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Expanded(
child: Container(
return Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
@ -22,6 +21,7 @@ class DesktopTitleBar extends StatelessWidget {
stops: [0.0, 1.0]),
),
child: WindowTitleBarBox(
child: SizedBox(
child: Row(
children: [
Expanded(