Keep even 16px window margins for top bars on wide windows
On a wide window (both sides at least 600 logical px) every SegmentedBar keeps the floating tab bar's 16px from the top and the sides, in every pane and page. A root WindowMargins scope adds the extra 8px to the top media padding, so Cupertino's fixed reserved bar height, list clearances, pinned headers and measured overlays all move together; the bar and the TopGlassStrip read the 16px side inset from the same scope, and sticky section chevrons keep 16px from the trailing edge. Phones keep 8/12.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import '../ui/adaptive/platform.dart';
|
||||
import '../ui/adaptive/window_margins.dart';
|
||||
import '../ui/theme/app_font_controller.dart';
|
||||
import '../ui/theme/app_theme.dart';
|
||||
import '../ui/scale/ui_scale.dart';
|
||||
@@ -102,6 +103,7 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
bool get _platformIsCupertino => prefersCupertino();
|
||||
|
||||
static Widget _scaled(BuildContext context, Widget? child) =>
|
||||
UiScaleHost(child: child ?? const SizedBox.shrink());
|
||||
static Widget _scaled(BuildContext context, Widget? child) => UiScaleHost(
|
||||
child: WindowMargins(child: child ?? const SizedBox.shrink()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import '../core/servers/chat/chat_server_pool.dart';
|
||||
import '../ui/adaptive/platform.dart';
|
||||
import '../ui/adaptive/window_margins.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -370,16 +371,18 @@ class _PipelinesRootState extends State<PipelinesRoot> {
|
||||
builder: (context, _) => _cupertino
|
||||
? CupertinoApp(
|
||||
title: 'Pipelines',
|
||||
builder: (context, child) =>
|
||||
UiScaleHost(child: child ?? const SizedBox.shrink()),
|
||||
builder: (context, child) => UiScaleHost(
|
||||
child: WindowMargins(child: child ?? const SizedBox.shrink()),
|
||||
),
|
||||
theme: appCupertinoThemeWith(fontFamily: fonts.family),
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: flow,
|
||||
)
|
||||
: MaterialApp(
|
||||
title: 'Pipelines',
|
||||
builder: (context, child) =>
|
||||
UiScaleHost(child: child ?? const SizedBox.shrink()),
|
||||
builder: (context, child) => UiScaleHost(
|
||||
child: WindowMargins(child: child ?? const SizedBox.shrink()),
|
||||
),
|
||||
theme: appLightTheme(fontFamily: fonts.family),
|
||||
darkTheme: appDarkTheme(fontFamily: fonts.family),
|
||||
debugShowCheckedModeBanner: false,
|
||||
|
||||
Reference in New Issue
Block a user