add support for elementary OS' CSD controls, issue #46

This commit is contained in:
Sai Kurogetsu 2018-06-08 03:22:32 +00:00
parent 7ec2cc3c35
commit ab2d48a19a
No known key found for this signature in database
GPG Key ID: 48E52EBE10D57BF6
2 changed files with 58 additions and 0 deletions

54
ui/csd-elementary.css Normal file
View File

@ -0,0 +1,54 @@
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Adjust empty space on the headerbar's sides */
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
margin-left: 43px !important;
margin-right: 43px !important;
padding-left: 7px !important;
padding-right: 7px !important;
}
/* Remove window controls separator */
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar::after {
display: none;
}
/* Remove the spacer pushing window controls to the right */
:root[tabsintitlebar] #titlebar-spacer {
display: none;
}
:root[tabsintitlebar] #titlebar {
margin-left: -4px;
}
:root[tabsintitlebar] #titlebar-buttonbox {
padding-left: 4px;
}
/* Expand window controls' container to the window's width */
:root[tabsintitlebar] #titlebar-content, #titlebar-buttonbox-container {
display: block;
}
:root[tabsintitlebar] #titlebar-buttonbox {
display: flex;
}
/* Don't let the title bar cover the headerbar */
:root[tabsintitlebar] #nav-bar {
z-index: 1;
}
/* Reorder titlebar buttons */
:root[tabsintitlebar] #titlebar-min {
display: none;
}
:root[tabsintitlebar] #titlebar-buttonbox {
direction: rtl;
}
:root[tabsintitlebar] #titlebar-buttonbox * {
direction: initial;
}
/* Move the close button to the left and the maximize button to the right */
:root[tabsintitlebar] #titlebar-buttonbox {
justify-content: space-between;
}

View File

@ -49,6 +49,10 @@
/*@import "ui/csd-2-buttons.css"; /**/
/* Window controls: 3 buttons */
/*@import "ui/csd-3-buttons.css"; /**/
/* Window controls: elementary OS (close on the left, maximize on the right)
* Warning: this doesn't work with the manual CSD switch, you must use the
* experimental automatic CSD instead */
/*@import "ui/csd-elementary.css"; /**/
/*******************************************************************************
* Other features (optional)