How do I put tabs in title bar when not maximized?

Discuss application theming and theme development.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

OK, so I did a little experiement. I used the following code (without the autohide part which requires the binding):

Code: Select all

#main-window[tabsontop="true"][autohide="true"] .titlebar-placeholder {
  display: -moz-box!important;
}


And nothing happened! Then I maximized and then unmaximized the window and the spaces appeared. Looking in DOMI, a width attribute is added to the titlebar-placeholders when you go into maximize mode, but not before. So I think you are right, the only way to do that part is to programmatically set the width, which is what Firefox does just at a different time.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

Now you just need to get feedback from Vista users and see if the window-control-buttons disappear. :P If they do, my bet is that you would need to apply all of the special mozappearances used for Maximize mode during your new non-maximized tabs-in-titlebar feature.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

patrickjdempsey wrote:Now you just need to get feedback from Vista users and see if the window-control-buttons disappear. :P If they do, my bet is that you would need to apply all of the special mozappearances used for Maximize mode during your new non-maximized tabs-in-titlebar feature.


I hope I don't have to. I've set the left and right margin of the tab bar to avoid the title bar buttons, so hopefully I don't end up with conflicts. Also instead of setting a negative bottom margin on the title bar, the way Firefox does to bring tabs up into the title bar, I'm using a negative top margin on the menu bar. So maybe I'll be able to avoid the Vista issues.

Once I work out the bugs of this trick, I'll have to figure out how to document for others to use.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

Hmmm... yes I think if you are actually putting a left and right margin on the menu and tabs toolbar, then that should automatically give you the space you need. Now you just gotta work out the issues with the backgrounds for the menubar and tab strip. You could always use CaptionText color for the menu and allow the background to be transparent.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

patrickjdempsey wrote:Hmmm... yes I think if you are actually putting a left and right margin on the menu and tabs toolbar, then that should automatically give you the space you need. Now you just gotta work out the issues with the backgrounds for the menubar and tab strip. You could always use CaptionText color for the menu and allow the background to be transparent.


What issues are you seeing? Can you provide a screen capture?
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

I just meant the grey background behind tabs seen in the screenshots in your main thread. Remember since you are using a different method than the default theme your titlebar is now visible behind the tabs.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

The grey backgrounds were from the flat background theme options. I hadn't actually gotten around to styling them yet. I first wanted to make sure my methodology would work.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

Okay, I've got a new problem. I can't for the life of me figure out how Firefox allows mouse clicks on the empty area of the tab bar to pass through to the title bar.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

@Patrick,

I've run into a problem with the binding you suggested I add to Classic Compact for the observer that adds an attribute to the #main-window. Please see: viewtopic.php?p=10711019#p10711019

Any help with what I'm doing wrong would be appreciated.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

Since you are using an extension, something like this should work in an overlay of browser.xul:

Code: Select all

<window id="main-window>
   <observes element="toolbar-menubar" attribute="autohide"/>
</window>
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

Got it. Works like a charm. Thanks
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

You are welcome! Sorry about the binding thing... I was thinking one-track mind and forgot you were using an extension... duh!
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

patrickjdempsey wrote:You are welcome! Sorry about the binding thing... I was thinking one-track mind and forgot you were using an extension... duh!

No worries, I learned something extra doing it both ways. I do find it interesting that doing it through the theme broke other people's bindings. :-k

As always, thanks for the help.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by patrickjdempsey »

Yeah bindings are weird weird stuff. Unfortunately the way they attach to elements requires you to include all other bindings using "extends" which of course isn't possible if you are not privvy to other bindings.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: How do I put tabs in title bar when not maximized?

Post by KLB »

patrickjdempsey wrote:Yeah bindings are weird weird stuff. Unfortunately the way they attach to elements requires you to include all other bindings using "extends" which of course isn't possible if you are not privvy to other bindings.

That is kind of stupid. At least this issue was discovered during the beta process and thankfully I have an extension I could put it in instead.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
Locked