MozillaZine

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

Discuss application theming and theme development.
patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 18th, 2011, 1:35 pm

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/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 18th, 2011, 1:42 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 18th, 2011, 1:48 pm

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)

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 18th, 2011, 4:04 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 18th, 2011, 4:19 pm

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)

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 18th, 2011, 4:42 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 18th, 2011, 5:18 pm

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)

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 18th, 2011, 7:46 pm

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)

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 20th, 2011, 11:25 am

@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)

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 20th, 2011, 1:17 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 20th, 2011, 1:25 pm

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)

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 20th, 2011, 1:31 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 20th, 2011, 1:51 pm

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)

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted April 20th, 2011, 1:56 pm

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/

KLB

User avatar
 
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine

Post Posted April 20th, 2011, 2:00 pm

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)

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 3 guests