From 5b4bc28058de18654b5a401bed2b57bd99ac8dab Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 11 Jan 2020 23:06:38 +0200 Subject: [PATCH] Restrict title width to approximate of the empty space available in the toolbar --- chrome/show_window_title_in_menubar.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/chrome/show_window_title_in_menubar.css b/chrome/show_window_title_in_menubar.css index f2d63b0..40da933 100644 --- a/chrome/show_window_title_in_menubar.css +++ b/chrome/show_window_title_in_menubar.css @@ -1,7 +1,16 @@ /* Shows window title in menubar */ /* Enable menubar for correct behavior */ @-moz-document url(chrome://browser/content/browser.xhtml){ - head{ display: block; position: fixed; width: 100vw; text-align: center } + head{ + display: block; + position: fixed; + right: 140px; /* Space for window controls */ + width: calc(100vw - 440px); /* Window width - window control width - menuitem (English) width */ + text-align: center + } head > *{ display: none } - head > title{ display: -moz-box; padding-top: 1px } + head > title{ display: -moz-box; padding-top: 1px; max-width: 60vw; overflow-x: -moz-hidden-unscrollable; text-overflow: ellipsis } + @media (-moz-os-version:windows-win10){ + :root[sizemode="maximized"] > head > title { padding-top: 10px } + } } \ No newline at end of file