Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window controls #14

Closed
Xanaxus opened this issue Feb 5, 2022 · 5 comments · Fixed by #15
Closed

Window controls #14

Xanaxus opened this issue Feb 5, 2022 · 5 comments · Fixed by #15

Comments

@Xanaxus
Copy link

Xanaxus commented Feb 5, 2022

Hey, love your work.

I usually don't use the title bar, so it will be nice if I can get it back when I'm using this customization [like the way flyingfox had implemented this] how does one go about doing this?

@drannex42
Copy link
Owner

drannex42 commented Feb 15, 2022

I am a little confused. But I'll try to answer this? Maybe?

If you want the minimize/max/close buttons, you will need to click on the hamburger menu (top right) -> More Tools -> Customize Toolbar, and then at the bottom left of the screen enable the titlebar.

I am not a 100% if this is what you are looking for, I am a bit frazzled at the moment but hopefully this helps!

@Mr-nUUb
Copy link
Contributor

Mr-nUUb commented Feb 22, 2022

Something like this?
grafik

step by step guide (not sure if something is missing):

  1. remove line
    position: relative !important;
  2. add following code to your userChrome.css:
/* Client Side Decorations / Window Controls */

/* reserve space for buttons */
#nav-bar {
  margin-right: 92px;
}

/* move buttons next to menu button */
#TabsToolbar .titlebar-buttonbox-container {
  visibility: visible !important;
  position: absolute;
  display:block;
  top: 8px;
  right: 0;
}

/* fix ugly background color */
#navigator-toolbox {
  background-color: #484d51 !important;
}

/* hide buttons in fullscreen mode (video player and F11) */
#main-window[inFullscreen="true"] .titlebar-buttonbox-container,
#main-window[inDOMFullscreen="true"] .titlebar-buttonbox-container {
  /* display: none !important; */
  visibility: hidden !important;
}

/* remove empty space when in fullscreen mode (F11) */
#main-window[inFullscreen="true"] #nav-bar {
  margin-right: 0px !important;;
}

/* END Client Side Decorations / Window Controls */

@Xanaxus
Copy link
Author

Xanaxus commented Feb 23, 2022

Yes just like that

I prefer my controls on the left, so I Have made the following adjustment to the above given code.

/* Client Side Decorations / Window Controls */

/* reserve space for buttons */
#nav-bar {
  margin-left: 150px;
}

/* move buttons next to menu button */
#TabsToolbar .titlebar-buttonbox-container {
  visibility: visible !important;
  position: absolute;
  display:block;
  top: 10px;
  left: 50px;
}

/* fix ugly background color */
#navigator-toolbox {
  background-color: #484d51 !important;
}

/* hide buttons in fullscreen mode (video player and F11) */
#main-window[inFullscreen="true"] .titlebar-buttonbox-container,
#main-window[inDOMFullscreen="true"] .titlebar-buttonbox-container {
  /* display: none !important; */
  visibility: hidden !important;
}

/* remove empty space when in fullscreen mode (F11) */
#main-window[inFullscreen="true"] #nav-bar {
  margin-right: 0px !important;;
}

/* END Client Side Decorations / Window Controls */

Thank you @Mr-nUUb
image

@Mr-nUUb
Copy link
Contributor

Mr-nUUb commented Feb 23, 2022

@Xanaxus please see my PR for updated code which doesn't involve deleting line #152 ;-)

@drannex42 I hope my PR fits your needs. As I'm not a CSS guru, I don't know how to make all this optional. It seems nested comments aren't possible (to enable/disable everything at once without deleting tons of comments). Maybe we should put it in another file and add something like add contents of userChrome.csd.css to the end of userChrome.css to enable CSD to the readme?

@drannex42
Copy link
Owner

drannex42 commented Feb 24, 2022

@Xanaxus @Mr-nUUb I have broken the entire extension into components for easier adding and removal of features, along with a designated preferences folder. I have made a new branch below for testing purposes. I have merged this with the main branch. I have also made it easier to specify if the CSd extension is on the left or right side, and removed the need for that background on the titlebar buttons.

#15 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants