detached b3a3512

fix(ui): resolve remaining GTK4 CSS warnings for margin-left:auto and progress sizing

commit
b3a3512c69ed0960817f25d0660a4d0b65fe25a1
author
bnema · · 2025-12-25 21:53 UTC
parent
4cc9149
signature
GPG Unverified2B82207D370127A0 The key is unknown
2 files · +10 -5
M internal/ui/component/progress_bar.go +2 -1
@@ -45,7 +45,8 @@ func NewProgressBar(factory layout.WidgetFactory) *ProgressBar {
4545
4646 // Set minimum size to prevent GTK warning about negative minimum width (-2)
4747 // The internal "progress" gizmo needs valid dimensions before realization
48- progressBar.SetSizeRequest(-1, 4)
48+ // Using 0 for width (not -1) ensures GTK doesn't calculate negative sizes
49+ progressBar.SetSizeRequest(0, 4)
4950
5051 // Don't intercept pointer events - let clicks pass through to WebView
5152 progressBar.SetCanTarget(false)
@@ -45,7 +45,8 @@ func NewProgressBar(factory layout.WidgetFactory) *ProgressBar {
45 45
46 // Set minimum size to prevent GTK warning about negative minimum width (-2)46 // Set minimum size to prevent GTK warning about negative minimum width (-2)
47 // The internal "progress" gizmo needs valid dimensions before realization47 // The internal "progress" gizmo needs valid dimensions before realization
48- progressBar.SetSizeRequest(-1, 4)48+ // Using 0 for width (not -1) ensures GTK doesn't calculate negative sizes
49+ progressBar.SetSizeRequest(0, 4)
49 50
50 // Don't intercept pointer events - let clicks pass through to WebView51 // Don't intercept pointer events - let clicks pass through to WebView
51 progressBar.SetCanTarget(false)52 progressBar.SetCanTarget(false)
M internal/ui/theme/css.go +8 -4
@@ -352,7 +352,7 @@ entry.omnibox-entry > *:focus-visible {
352352 padding: 0.125em 0.5em;
353353 font-size: 0.6875em;
354354 font-weight: 600;
355- margin-left: auto;
355+ /* Note: margin-left: auto not supported in GTK4 CSS, use SetHalign(End) in code */
356356 }
357357 `
358358 }
@@ -549,13 +549,17 @@ progressbar.osd {
549549
550550 progressbar.osd trough {
551551 min-height: 4px;
552- min-width: 0px;
552+ min-width: 2px;
553+ margin: 0;
554+ padding: 0;
553555 background-color: alpha(var(--bg), 0.3);
554556 }
555557
556558 progressbar.osd progress {
557559 min-height: 4px;
558- min-width: 0px;
560+ min-width: 2px;
561+ margin: 0;
562+ padding: 0;
559563 background-color: var(--accent);
560564 }
561565 `
@@ -689,7 +693,7 @@ row:selected .session-manager-row {
689693 .session-time {
690694 font-size: 0.75em;
691695 color: var(--muted);
692- margin-left: auto;
696+ /* Note: margin-left: auto not supported in GTK4 CSS, use SetHalign(End) in code */
693697 }
694698
695699 /* Section divider for EXITED sessions */
@@ -352,7 +352,7 @@ entry.omnibox-entry > *:focus-visible {
352 padding: 0.125em 0.5em;352 padding: 0.125em 0.5em;
353 font-size: 0.6875em;353 font-size: 0.6875em;
354 font-weight: 600;354 font-weight: 600;
355- margin-left: auto;355+ /* Note: margin-left: auto not supported in GTK4 CSS, use SetHalign(End) in code */
356 }356 }
357 `357 `
358 }358 }
@@ -549,13 +549,17 @@ progressbar.osd {
549 549
550 progressbar.osd trough {550 progressbar.osd trough {
551 min-height: 4px;551 min-height: 4px;
552- min-width: 0px;552+ min-width: 2px;
553+ margin: 0;
554+ padding: 0;
553 background-color: alpha(var(--bg), 0.3);555 background-color: alpha(var(--bg), 0.3);
554 }556 }
555 557
556 progressbar.osd progress {558 progressbar.osd progress {
557 min-height: 4px;559 min-height: 4px;
558- min-width: 0px;560+ min-width: 2px;
561+ margin: 0;
562+ padding: 0;
559 background-color: var(--accent);563 background-color: var(--accent);
560 }564 }
561 `565 `
@@ -689,7 +693,7 @@ row:selected .session-manager-row {
689 .session-time {693 .session-time {
690 font-size: 0.75em;694 font-size: 0.75em;
691 color: var(--muted);695 color: var(--muted);
692- margin-left: auto;696+ /* Note: margin-left: auto not supported in GTK4 CSS, use SetHalign(End) in code */
693 }697 }
694 698
695 /* Section divider for EXITED sessions */699 /* Section divider for EXITED sessions */

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close