Skip to content

Commit e35fdab

Browse files
fixed text overflow on sidebar item (#513)
* fixed text overflow on sidebar item * updated version and changelog
1 parent de31bfe commit e35fdab

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [2.0.8]
2+
### 🛠️ Updated 🛠️
3+
* Fixed `SidebarItem` text overflowing.
4+
15
## [2.0.7]
26
### 🛠️ Updated 🛠️
37
* Made most widgets aware of the user’s accent color and window state by adding respective fields to `MacosThemeData`.

lib/src/layout/sidebar/sidebar_items.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,14 @@ class _SidebarItem extends StatelessWidget {
318318
child: item.leading!,
319319
),
320320
),
321-
DefaultTextStyle(
322-
style: labelStyle.copyWith(
323-
color: selected ? textLuminance(selectedColor) : null,
321+
Expanded(
322+
child: DefaultTextStyle(
323+
style: labelStyle.copyWith(
324+
color: selected ? textLuminance(selectedColor) : null,
325+
overflow: TextOverflow.ellipsis,
326+
),
327+
child: item.label,
324328
),
325-
child: item.label,
326329
),
327330
if (hasTrailing) ...[
328331
const Spacer(),

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: macos_ui
22
description: Flutter widgets and themes implementing the current macOS design language.
3-
version: 2.0.7
3+
version: 2.0.8
44
homepage: "https://macosui.dev"
55
repository: "https://github.com/GroovinChip/macos_ui"
66

0 commit comments

Comments
 (0)