Commit graph

33 commits

Author SHA1 Message Date
Andreas Kling
b348f141d2 UI/Qt: Draw a border around frameless windows
When using client-side decorations, the window was a flat rectangle
with no outline, so its edge disappeared against similarly colored
backgrounds. Paint a 1px border in a new chrome window outline color
and reserve a matching 1px contents margin so child widgets do not
cover it.

The outline color matches chrome_border() in dark mode, but is darker
in light mode, since the window edge has to hold up against arbitrary
backdrops behind the window rather than our own chrome surfaces.

The border is skipped when the window is maximized or fullscreen, and
on macOS, where frameless windows already get rounded corners and a
native shadow.
2026-06-11 11:15:35 +02:00
Andreas Kling
8d4493a789 UI/Qt: Tint missing find-in-page results
Mark the search field with a dynamic property when a find-in-page query
has zero matches, and let the chrome stylesheet show a red-tinted
background. Clear the state immediately for empty searches.
2026-06-11 11:15:25 +02:00
Timothy Flynn
388189d979 UI/Qt: Tweak the color used for the collapsed tab close button
The previous color was a bit jarringly bright.
2026-06-03 13:48:44 +02:00
Andreas Kling
4f411dce7b UI/Qt: Remove omnibox hover styling
Make hovering the location editor use the same fill and border as its
normal state in both light and dark mode. Focus still uses the focused
border, with a subtle focused fill retained for dark mode.
2026-06-03 02:53:37 +02:00
Andreas Kling
7cd93753c4 UI/Qt: Keep light-mode omnibox bright on focus
Use the normal light chrome surface for the focused location editor
background instead of reusing the hover fill. Dark mode keeps its
slightly distinct focused fill so the input remains readable there.
2026-06-03 02:53:37 +02:00
Andreas Kling
be2cbc0f07 UI/Qt: Simplify browser chrome layout
Remove dead vertical-tab separator and sidebar traffic-light paths from
the unified chrome layout. Keep the toolbar stack owned by TabWidget so
layout changes no longer move each tab toolbar in and out of its page.
Share the vertical New Tab button setup between initial layout and
hover expansion, and keep window-control sizing helpers private.
2026-06-03 02:53:37 +02:00
Andreas Kling
4f314b0aa0 UI/Qt: Unify browser chrome layout
Treat the toolbar, tab strip, and vertical sidebar as one browser
chrome surface. Add an explicit layout policy for platform window
controls and sidebar widths. This lets macOS use left-side traffic
lights while other platforms keep right-side custom controls.

Keep the macOS toolbar stable in vertical-tabs mode. Traffic lights and
navigation controls stay in the top row, and the sidebar sits below it.
Draw chrome/content separators explicitly so the content edge remains
clear without adding seams inside the chrome surface.

Retune tab, toolbar, and omnibox styling for the unified chrome. Tabs
use card-like selected states, quiet inactive states, and matching
horizontal and vertical geometry.

Make hover-expanded vertical tabs draw as a chrome overlay so the web
content does not relayout. Keep the overlay above native web views and
route macOS window drags through AppKit events for reliable dragging
from custom chrome.
2026-06-03 02:53:37 +02:00
Timothy Flynn
a6e67d58ea UI/Qt: Draw tab close and audio state icons on collapsed tabs
We previously just hid this icons as a future TODO. We now draw a tab
close icon on hover in the upper-left corner of the tab, and an audio
state icon when audio is playing on the lower-right corner. Just like
expanded tabs, the audio state icon is interactable and may be used to
mute the page.
2026-06-02 21:55:14 +02:00
Timothy Flynn
748ef48f26 UI/Qt: Draw the tab audio state icons with chrome icon infra
We currently rely on QStyle icons to draw the audio state icons. But
these icons are system dependent. The macOS icons look particularly
out-of-place here. So let's draw chrome icons.
2026-06-02 21:55:14 +02:00
Sam Atkins
a92b9a7e34 UI/Qt: Put DevTools banner in its own widget, not a status bar
Using the status bar for this meant that the "DevTools is enabled on
port X" message would get overwritten whenever the user hovered over a
menu item. We don't otherwise use or need a status bar, so replace it
with an explicit banner widget that's only used for this purpose. Keep
the existing styling so it looks the same as before.
2026-06-01 15:29:51 +01:00
Andreas Kling
24e767a06e UI/Qt: Polish vertical tab sidebar chrome
Refine vertical tab sidebar styling. Let inactive tabs sit on chrome.
Keep close buttons quiet. Align the New Tab row with tab rows.

Persist the expanded sidebar width and keep resizing bounded. Put the
resize hit area over the divider. Keep the collapsed rail fixed-width.
Avoid explicit mouse grabs while dragging.

Paint subtle sidebar dividers. Move the expand/collapse control into
the navigation toolbar. Tune the fallback globe and vertical-tabs icons.
2026-06-01 02:05:44 +02:00
Andreas Kling
a7e68ef1ae UI/Qt: Integrate window controls into vertical tab toolbar
Move custom window controls into the navigation toolbar while vertical
tabs are enabled. Remove the separate top row that only held them.

Mark empty toolbar space as draggable so the unified row acts like the
titlebar. Keep horizontal tab mode on the existing tab strip controls.
2026-06-01 02:05:44 +02:00
Timothy Flynn
a7f1ed7a10 UI/Qt: Begin implementing vertical tab support
This implements an initial version of vertical tabs for the Qt UI. Users
may enable vertical tabs in about:settings. When enabled, a button is
added to the toolbar to expand/collapse the vertical tabs.

There is plenty more to do here. We will want to support expanding on
hover, drawing the close tab / audio button indicators on collapsed
vertical tabs, positioning the vetical tab bar, etc.
2026-05-31 21:24:57 +02:00
Andreas Kling
756be80c8e UI/Qt: Add a location zoom indicator
Show active page zoom as a muted pill inside the right side of the
location edit whenever zoom differs from 100%. Keep it next to the
bookmark action and reserve text margin space so the URL cannot render
under the controls.

Clicking the pill activates the existing reset zoom action, returning
the page to 100% and hiding the indicator again.
2026-05-31 19:46:21 +02:00
Andreas Kling
7701f5e78f UI/Qt: Rework omnibox leading indicator
Stop mirroring the tab favicon and loading spinner inside the omnibox.
The tab already owns that state, so the leading omnibox control now
reflects the action or warning relevant to the field.

HTTP pages show a compact Not secure pill, edited URL-like input shows
the globe, and edited search input shows the search icon. Current
non-HTTP pages leave the leading edge quiet so ordinary navigation does
not look like a security status surface.
2026-05-31 19:20:59 +02:00
Andreas Kling
effedec392 UI/Qt: Refine compact chrome appearance
Normalize generated chrome icon weights and alignment, tune dark and
light chrome surface layering, and move the compact palette toward a
quieter neutral treatment. Keep the compact tab strip and toolbar
heights while making the toolbar, tab surfaces, omnibox, and navigation
cluster feel more balanced.

Use tonal dark-mode seams instead of bright separator lines, quiet the
resting omnibox border, and keep background tabs full-strength while
using shape and layering to distinguish the selected tab.
2026-05-31 19:20:59 +02:00
Andreas Kling
1516560bc6 UI/Qt: Tighten browser chrome spacing
Reduce the Qt tab strip, navigation toolbar, and location edit heights
so the combined chrome takes less vertical space while the toolbar
buttons keep comfortable 36 px targets. Keep glyph sizes unchanged and
use inset toolbar button styling so the painted hover surfaces feel
lighter than the clickable area.
2026-05-31 19:20:59 +02:00
Timothy Flynn
af82d31cdc UI/Qt: Polish bookmarks bar layout
Custom-paint bookmark bar buttons so favicons and titles are spaced and
vertically centered consistently. Qt’s default QToolButton label layout
does not expose enough control over the icon/text gap or pixel-level
vertical alignment needed for the tightened bookmarks bar.
2026-05-28 22:04:24 +02:00
Timothy Flynn
32c11518d7 UI/Qt: Restore application menu icons for bookmark items
Commit 972c19b292 removed most icons from
application menus. But all other browsers show favicons in the bookmark
menu. So let's restore those icons.
2026-05-28 22:04:24 +02:00
Andreas Kling
770829a855 UI/Qt: Put window controls in visible menu bar
Add a menu bar corner widget for the frameless window controls when
the Qt menu bar is visible. Hide the tab strip controls in that mode
so the buttons stay at the top-right edge of the window, and remove
the separator below the menu bar so the chrome reads as one surface.

Use compact menu bar controls and keep the right padding tight so the
buttons align with the edge without changing the hidden-menu layout.
2026-05-27 22:05:54 +02:00
Andreas Kling
1c8223bffa UI/Qt: Add a shared window control button
Add a shared WindowControlButton for the frameless window controls. It
clears the pressed visual state when the pointer leaves during a press,
and restores it on re-entry.

Also reset transient button state around double-clicks so pressed
styling cannot get stuck after the window state changes.
2026-05-27 22:05:54 +02:00
Andreas Kling
972c19b292 UI/Qt: Remove icons from menus
Let application actions opt out of icon creation when created for
menus. Use that path for browser menus, tab context menus, and
WebView-backed popup menus.

Keep icon creation for toolbar and bookmarks bar actions, where the
same helper still provides visible button icons. Remove the icon setup
that is now only used by menu actions, and shrink popup menu item
padding now that there is no icon column.
2026-05-27 22:05:54 +02:00
Andreas Kling
0baeddd972 UI/Qt: Style popup menus
Add application-level QMenu styling using the existing chrome palette so
menu bar dropdowns, hamburger menus, context menus, and other popups use
the same colors and item states. Refresh the application stylesheet when
the Qt palette or theme changes.
2026-05-27 22:05:54 +02:00
Andreas Kling
7e034608ef UI/Qt: Style the menu bar
Add a QMenuBar stylesheet that uses the same chrome palette as the tab
strip and navigation toolbar. Apply it from BrowserWindow and refresh it
when the palette changes so the optional menu bar matches the frameless
window chrome.
2026-05-27 22:05:54 +02:00
Timothy Flynn
aaeaf11d45 UI/Qt: Shrink the bookmarks bar padding a bit
It takes up quite a bit of room that exceeds that of other browsers.
2026-05-27 13:13:11 -04:00
Timothy Flynn
8f14e85af4 UI/Qt: Store the toolbar and bookmarks bar in a common container
The bookmarks bar sticks out a bit too much in its own container with
its own background color. This adds a common container for both bars
so that we can apply the background color gradient to that common
container. This naturally handles showing/hiding the bookmarks bar
gracefully.
2026-05-27 13:13:11 -04:00
Timothy Flynn
6e2c92bb8b UI/Qt: Use QString format helper to create UI stylesheets 2026-05-26 15:17:56 -04:00
Timothy Flynn
8ccdea63f5 UI/Qt: Apply a stylesheet to the devtools status bar 2026-05-26 13:06:54 -04:00
Andreas Kling
14ac01b0ce UI/Qt: Refine chrome layout spacing
Keep active and hovered tabs on the same geometry while tightening the
surrounding chrome rhythm. Reduce tab and toolbar padding, shorten the
navigation toolbar and omnibox, center the new tab button, and enlarge
tab close buttons to match the refined tab sizing.
2026-05-26 15:20:59 +02:00
Andreas Kling
b8e266c631 UI/Qt: Centralize chrome material colors
Define neutral chrome material anchors in one place and derive shared
surface, hover, pressed, and border colors from them. This removes
system accent color from chrome hover fills and gives the tab strip,
toolbar, and omnibox separate material roles in both color schemes.
2026-05-26 15:20:59 +02:00
Andreas Kling
7a4a633d04 UI/Qt+WebContent: Refresh theme colors live
Refresh Qt chrome palettes from the current color scheme when the
application palette changes. Recompute autocomplete and location field
colors and repaint WebContent immediately so theme changes do not
require another interaction or restart.
2026-05-26 01:18:51 +02:00
Andreas Kling
3adeed9581 UI/Qt: Polish browser chrome appearance
Refine the material colors, tab integration, toolbar spacing, and
custom glyphs used by the Qt browser chrome. Keep the visual density
compact while making the controls feel clearer and less toolkit-like.
Mark the window opaque and show resize cursors for frameless chrome.
2026-05-26 01:18:51 +02:00
Andreas Kling
328d89f3c1 UI/Qt: Draw custom browser window chrome
Add shared chrome styling helpers and use them to paint the Linux
browser tab strip and surrounding toolbar widgets. Make the browser
window frameless on Qt so the tabs, toolbar, and window controls can
share one integrated chrome surface.
2026-05-26 01:18:51 +02:00