style: unify compact radii and resize lane chrome
This commit is contained in:
parent
c9180cbca5
commit
7883a7cc30
@ -268,6 +268,7 @@ extension AssistantPageStateClosureInternal on AssistantPageStateInternal {
|
||||
}) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final palette = context.palette;
|
||||
final maxPaneWidth = math.min(
|
||||
560.0,
|
||||
math.max(
|
||||
@ -282,22 +283,25 @@ extension AssistantPageStateClosureInternal on AssistantPageStateInternal {
|
||||
children: [
|
||||
Expanded(child: child),
|
||||
if (!artifactPaneCollapsedInternal) ...[
|
||||
SizedBox(
|
||||
key: const Key('assistant-artifact-pane-resize-handle'),
|
||||
width: assistantHorizontalResizeHandleWidthInternal,
|
||||
child: PaneResizeHandle(
|
||||
axis: Axis.horizontal,
|
||||
onDelta: (delta) {
|
||||
setState(() {
|
||||
artifactPaneWidthInternal =
|
||||
(artifactPaneWidthInternal - delta)
|
||||
.clamp(
|
||||
assistantArtifactPaneMinWidthInternal,
|
||||
maxPaneWidth,
|
||||
)
|
||||
.toDouble();
|
||||
});
|
||||
},
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(color: palette.chromeBackground),
|
||||
child: SizedBox(
|
||||
key: const Key('assistant-artifact-pane-resize-handle'),
|
||||
width: assistantHorizontalResizeHandleWidthInternal,
|
||||
child: PaneResizeHandle(
|
||||
axis: Axis.horizontal,
|
||||
onDelta: (delta) {
|
||||
setState(() {
|
||||
artifactPaneWidthInternal =
|
||||
(artifactPaneWidthInternal - delta)
|
||||
.clamp(
|
||||
assistantArtifactPaneMinWidthInternal,
|
||||
maxPaneWidth,
|
||||
)
|
||||
.toDouble();
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: assistantHorizontalPaneGapInternal),
|
||||
|
||||
@ -21,13 +21,13 @@ class SimpleSpacing {
|
||||
class SimpleRadius {
|
||||
SimpleRadius._();
|
||||
|
||||
static const double card = 16.0;
|
||||
static const double card = 12.0;
|
||||
static const double button = 12.0;
|
||||
static const double input = 14.0;
|
||||
static const double input = 12.0;
|
||||
static const double chip = 12.0;
|
||||
static const double badge = 12.0;
|
||||
static const double dialog = 18.0;
|
||||
static const double sidebar = 20.0;
|
||||
static const double dialog = 12.0;
|
||||
static const double sidebar = 12.0;
|
||||
static const double icon = 12.0;
|
||||
}
|
||||
|
||||
|
||||
@ -372,6 +372,7 @@ class WebAssistantPageStateInternal extends State<WebAssistantPage> {
|
||||
}) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final palette = context.palette;
|
||||
final maxPaneWidth = math.min(
|
||||
520.0,
|
||||
math.max(
|
||||
@ -386,22 +387,25 @@ class WebAssistantPageStateInternal extends State<WebAssistantPage> {
|
||||
children: [
|
||||
Expanded(child: child),
|
||||
if (!artifactPaneCollapsedInternal) ...[
|
||||
SizedBox(
|
||||
key: const Key('assistant-artifact-pane-resize-handle'),
|
||||
width: 8,
|
||||
child: PaneResizeHandle(
|
||||
axis: Axis.horizontal,
|
||||
onDelta: (delta) {
|
||||
setState(() {
|
||||
artifactPaneWidthInternal =
|
||||
(artifactPaneWidthInternal - delta)
|
||||
.clamp(
|
||||
webAssistantArtifactPaneMinWidthInternal,
|
||||
maxPaneWidth,
|
||||
)
|
||||
.toDouble();
|
||||
});
|
||||
},
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(color: palette.chromeBackground),
|
||||
child: SizedBox(
|
||||
key: const Key('assistant-artifact-pane-resize-handle'),
|
||||
width: 8,
|
||||
child: PaneResizeHandle(
|
||||
axis: Axis.horizontal,
|
||||
onDelta: (delta) {
|
||||
setState(() {
|
||||
artifactPaneWidthInternal =
|
||||
(artifactPaneWidthInternal - delta)
|
||||
.clamp(
|
||||
webAssistantArtifactPaneMinWidthInternal,
|
||||
maxPaneWidth,
|
||||
)
|
||||
.toDouble();
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
||||
@ -38,9 +38,9 @@ void main() {
|
||||
});
|
||||
|
||||
test('AppTheme matches calm compact workspace baseline tokens', () {
|
||||
expect(AppRadius.card, 16);
|
||||
expect(AppRadius.input, 14);
|
||||
expect(AppRadius.dialog, 18);
|
||||
expect(AppRadius.card, 12);
|
||||
expect(AppRadius.input, 12);
|
||||
expect(AppRadius.dialog, 12);
|
||||
expect(AppRadius.chip, 12);
|
||||
expect(AppTypography.sectionSize, 13);
|
||||
expect(AppTypography.bodySize, 13);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user