detached 4cc9149

fix(ui): resolve GTK4 CSS warnings and progress bar sizing

commit
4cc9149df8b361e88342027d9719fa7558335238
author
bnema · · 2025-12-25 21:49 UTC
parent
69a228f
signature
GPG Unverified2B82207D370127A0 The key is unknown
2 files · +9 -6
M internal/ui/component/progress_bar.go +5 -2
@@ -43,12 +43,15 @@ func NewProgressBar(factory layout.WidgetFactory) *ProgressBar {
4343 progressBar.SetHalign(gtk.AlignFillValue)
4444 progressBar.SetHexpand(true)
4545
46+ // Set minimum size to prevent GTK warning about negative minimum width (-2)
47+ // The internal "progress" gizmo needs valid dimensions before realization
48+ progressBar.SetSizeRequest(-1, 4)
49+
4650 // Don't intercept pointer events - let clicks pass through to WebView
4751 progressBar.SetCanTarget(false)
4852 progressBar.SetCanFocus(false)
4953
50- // Initialize fraction to 0 to force proper sizing of internal progress gizmo
51- // This prevents GTK warning about negative minimum width
54+ // Initialize fraction to 0
5255 progressBar.SetFraction(0)
5356
5457 // Hidden by default
@@ -43,12 +43,15 @@ func NewProgressBar(factory layout.WidgetFactory) *ProgressBar {
43 progressBar.SetHalign(gtk.AlignFillValue)43 progressBar.SetHalign(gtk.AlignFillValue)
44 progressBar.SetHexpand(true)44 progressBar.SetHexpand(true)
45 45
46+ // Set minimum size to prevent GTK warning about negative minimum width (-2)
47+ // The internal "progress" gizmo needs valid dimensions before realization
48+ progressBar.SetSizeRequest(-1, 4)
49+
46 // Don't intercept pointer events - let clicks pass through to WebView50 // Don't intercept pointer events - let clicks pass through to WebView
47 progressBar.SetCanTarget(false)51 progressBar.SetCanTarget(false)
48 progressBar.SetCanFocus(false)52 progressBar.SetCanFocus(false)
49 53
50- // Initialize fraction to 0 to force proper sizing of internal progress gizmo54+ // Initialize fraction to 0
51- // This prevents GTK warning about negative minimum width
52 progressBar.SetFraction(0)55 progressBar.SetFraction(0)
53 56
54 // Hidden by default57 // Hidden by default
M internal/ui/theme/css.go +4 -4
@@ -240,7 +240,7 @@ entry.omnibox-entry:focus-visible {
240240 border-color: var(--accent);
241241 background-color: shade(var(--bg), 1.05);
242242 outline-style: none;
243- outline-width: 0;
243+ outline-width: 0px;
244244 outline-color: transparent;
245245 }
246246
@@ -393,7 +393,7 @@ entry.find-bar-entry:focus-within,
393393 entry.find-bar-entry:focus-visible {
394394 border-color: var(--accent);
395395 outline-style: none;
396- outline-width: 0;
396+ outline-width: 0px;
397397 outline-color: transparent;
398398 }
399399
@@ -578,7 +578,7 @@ func generateSessionManagerCSS(p Palette) string {
578578 border-radius: 0.1875em;
579579 padding: 0;
580580 min-width: 28em;
581- max-width: 40em;
581+ /* Note: max-width not supported in GTK4 CSS, rely on container constraints */
582582 }
583583
584584 /* Header with title */
@@ -778,7 +778,7 @@ func generateLinkStatusCSS(p Palette) string {
778778 padding: 0.25em 0.5em;
779779 margin: 0;
780780 font-size: 0.75em;
781- max-width: 50em;
781+ /* Note: max-width not supported in GTK4 CSS, use label SetMaxWidthChars instead */
782782 box-shadow: 0 -1px 4px alpha(black, 0.15);
783783
784784 /* Fade transition - hidden by default */
@@ -240,7 +240,7 @@ entry.omnibox-entry:focus-visible {
240 border-color: var(--accent);240 border-color: var(--accent);
241 background-color: shade(var(--bg), 1.05);241 background-color: shade(var(--bg), 1.05);
242 outline-style: none;242 outline-style: none;
243- outline-width: 0;243+ outline-width: 0px;
244 outline-color: transparent;244 outline-color: transparent;
245 }245 }
246 246
@@ -393,7 +393,7 @@ entry.find-bar-entry:focus-within,
393 entry.find-bar-entry:focus-visible {393 entry.find-bar-entry:focus-visible {
394 border-color: var(--accent);394 border-color: var(--accent);
395 outline-style: none;395 outline-style: none;
396- outline-width: 0;396+ outline-width: 0px;
397 outline-color: transparent;397 outline-color: transparent;
398 }398 }
399 399
@@ -578,7 +578,7 @@ func generateSessionManagerCSS(p Palette) string {
578 border-radius: 0.1875em;578 border-radius: 0.1875em;
579 padding: 0;579 padding: 0;
580 min-width: 28em;580 min-width: 28em;
581- max-width: 40em;581+ /* Note: max-width not supported in GTK4 CSS, rely on container constraints */
582 }582 }
583 583
584 /* Header with title */584 /* Header with title */
@@ -778,7 +778,7 @@ func generateLinkStatusCSS(p Palette) string {
778 padding: 0.25em 0.5em;778 padding: 0.25em 0.5em;
779 margin: 0;779 margin: 0;
780 font-size: 0.75em;780 font-size: 0.75em;
781- max-width: 50em;781+ /* Note: max-width not supported in GTK4 CSS, use label SetMaxWidthChars instead */
782 box-shadow: 0 -1px 4px alpha(black, 0.15);782 box-shadow: 0 -1px 4px alpha(black, 0.15);
783 783
784 /* Fade transition - hidden by default */784 /* Fade transition - hidden by default */

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