diff --git a/lib/domain/utils/screen/size_extension.dart b/lib/domain/utils/screen/size_extension.dart index e12750df..daa65c62 100644 --- a/lib/domain/utils/screen/size_extension.dart +++ b/lib/domain/utils/screen/size_extension.dart @@ -19,6 +19,8 @@ extension SizeExtension on num { ///[ScreenUtil.setSp] double get sp => ScreenUtil().setSp(this); + double get windowRadius => w*5; + ///smart size : it check your value - if it is bigger than your value it will set your value ///for example, you have set 16.sm() , if for your screen 16.sp() is bigger than 16 , then it will set 16 not 16.sp() ///I think that it is good for save size balance on big sizes of screen diff --git a/lib/infra/components/window.dart b/lib/infra/components/window.dart index 2d3df6df..87233985 100644 --- a/lib/infra/components/window.dart +++ b/lib/infra/components/window.dart @@ -46,11 +46,7 @@ class _AeroFrameState extends State with WindowListener { final constTheme = Theme.of(context).extension()!; return Container( decoration: BoxDecoration( - color: constTheme.sidebarBg.withOpacity(0.68), - // border: Border.all( - // color: Theme.of(context).dividerColor.withOpacity(0.3), - // width: (_isMaximized || _isFullScreen) ? 0 : 1, - // ), + color: constTheme.sidebarBg.withOpacity(0.78), borderRadius: BorderRadius.circular((_isMaximized || _isFullScreen) ? 0 : 14), boxShadow: [ if (!_isMaximized && !_isFullScreen) @@ -65,7 +61,7 @@ class _AeroFrameState extends State with WindowListener { child: ClipRRect( // clipBehavior: Clip.hardEdge, borderRadius: BorderRadius.circular( - (_isMaximized || _isFullScreen) ? 0 : 16, + (_isMaximized || _isFullScreen) ? 0 : 6.w, ), child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), @@ -74,7 +70,7 @@ class _AeroFrameState extends State with WindowListener { child: ClipRRect( clipBehavior: Clip.hardEdge, borderRadius: BorderRadius.circular( - (_isMaximized || _isFullScreen) ? 0 : 12, + (_isMaximized || _isFullScreen) ? 0 : 1.windowRadius, ), child: widget.child, ), diff --git a/lib/infra/pages/chat/channel/bar.dart b/lib/infra/pages/chat/channel/bar.dart index 205f88c0..b5a83c90 100644 --- a/lib/infra/pages/chat/channel/bar.dart +++ b/lib/infra/pages/chat/channel/bar.dart @@ -16,8 +16,7 @@ class ChannelBar extends StatefulWidget implements PreferredSizeWidget { final link.Room room; final Widget? tools; final Function? onBack; - ChannelBar({super.key, this.onBack, this.tools, required this.room, double? height}) - : _height = height ?? 60.w; + ChannelBar({super.key, this.onBack, this.tools, required this.room, double? height}) : _height = height ?? 60.w; @override State createState() => _ChannelBarState(); @@ -59,7 +58,7 @@ class _ChannelBarState extends State { height: widget._height, decoration: BoxDecoration( color: constTheme.centerChannelBg, - borderRadius: BorderRadius.only(topLeft: Radius.circular(10.w)), + borderRadius: BorderRadius.only(topLeft: Radius.circular(1.windowRadius), topRight: Radius.circular(1.windowRadius)), border: Border( bottom: BorderSide(color: constTheme.centerChannelDivider), ), diff --git a/lib/infra/pages/chat/channel/chat.dart b/lib/infra/pages/chat/channel/channel.dart similarity index 99% rename from lib/infra/pages/chat/channel/chat.dart rename to lib/infra/pages/chat/channel/channel.dart index fbed885c..a824e41b 100644 --- a/lib/infra/pages/chat/channel/chat.dart +++ b/lib/infra/pages/chat/channel/channel.dart @@ -391,7 +391,7 @@ class _ChannelDetailPageState extends State with WindowListen backgroundColor: Colors.transparent, body: Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(bottomLeft: Radius.circular(10.w)), + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(1.windowRadius)), color: constTheme.centerChannelBg, ), child: Column( diff --git a/lib/infra/pages/chat/channel_list.dart b/lib/infra/pages/chat/channel_list.dart index b5fa855d..b220f689 100644 --- a/lib/infra/pages/chat/channel_list.dart +++ b/lib/infra/pages/chat/channel_list.dart @@ -57,7 +57,7 @@ class _ChannelListState extends State { color: currentId == chat.id ? constTheme.sidebarTextActiveBorder.withOpacity(0.09) : Colors.transparent, hoverColor: currentId == chat.id ? constTheme.sidebarTextActiveBorder.withOpacity(0.09):constTheme.centerChannelColor.withOpacity(0.08), radius: 5.w, - margin: EdgeInsets.only(left: 5.w, right: 5.w, bottom: 2.w), + margin: EdgeInsets.only(left: 8.w, right: 8.w, bottom: 2.w), onPressed: () async { org.setChannelId(chat.id); }, diff --git a/lib/infra/pages/chat/chat.dart b/lib/infra/pages/chat/chat.dart index cceb9a16..0928ac06 100644 --- a/lib/infra/pages/chat/chat.dart +++ b/lib/infra/pages/chat/chat.dart @@ -9,7 +9,7 @@ import 'package:dtim/application/store/app/org.dart'; import 'package:dtim/domain/utils/screen/screen.dart'; import 'package:dtim/infra/components/components.dart'; import 'package:dtim/application/store/theme.dart'; -import 'channel/chat.dart'; +import 'channel/channel.dart'; import 'chat_view.dart'; @RoutePage(name: "orgRoute") @@ -41,7 +41,7 @@ class _OrgPageState extends State { width: leftWidth, decoration: BoxDecoration( color: constTheme.centerChannelBg, - borderRadius: BorderRadius.circular(10.w) + borderRadius: BorderRadius.circular(1.windowRadius) ), margin: EdgeInsets.only(left: 3.w), child: OrgViewPage(key: const Key("OrgViewPage"), width: leftWidth), diff --git a/lib/infra/pages/chat/chat_view.dart b/lib/infra/pages/chat/chat_view.dart index f270e493..8837d33c 100644 --- a/lib/infra/pages/chat/chat_view.dart +++ b/lib/infra/pages/chat/chat_view.dart @@ -60,6 +60,7 @@ class _OrgViewPageState extends State { final constTheme = Theme.of(context).extension()!; return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ // moveWindow( // Row( @@ -140,6 +141,18 @@ class _OrgViewPageState extends State { // height: 1, // color: constTheme.centerChannelColor.withOpacity(0.08), // ), + Padding( + padding: EdgeInsets.all(8.w), + child: Text( + "Message", + textAlign: TextAlign.start, + style: TextStyle( + fontWeight: FontWeight.w800, + fontSize: 14.w, + color: constTheme.centerChannelColor, + ), + ), + ), SingleChildScrollView( child: showType ? Column( @@ -474,12 +487,7 @@ class _OrgViewPageState extends State { }) ], ) - : Column( - children: [ - SizedBox(height: 20.w), - const ChannelList(key: Key("ChannelList")), - ], - ), + : const ChannelList(key: Key("ChannelList")), ), ], );