Theme · Platform: caption buttons of their own height, titles that give way
Windows caption buttons take the bar's height less its hairline, a new token, instead of their row's, so they keep their height beside caps that wrap below them. A title bar's title is an Ellipsis: on Windows it takes the free width before the buttons and gives way; a centered title sits inset past the lights on both sides. The controls never shrink. Tests hold a long Windows title's close button inside a 280px bar and wrapped caps inside their row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3c8cca4c9
commit
815aed304d
5 files changed
+80
-8
No files matched your search
@@ -230,6 +230,11 @@ impl Theme {
|
||||
px_to_rems(46.0)
|
||||
}
|
||||
|
||||
/// A Windows caption button's height: the title bar's, less its bottom hairline.
|
||||
pub fn caption_button_height(&self) -> Pixels {
|
||||
self.titlebar_height().to_pixels(self.base_rem()) - px(1.0)
|
||||
}
|
||||
|
||||
/// Resize margin of a client-drawn window.
|
||||
pub fn window_inset(&self) -> Rems {
|
||||
px_to_rems(10.0)
|
||||
|
||||
Reference in new issue
Block a user