No success with Aero titlebar support

Discuss application theming and theme development.
User avatar
CatThief
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

No success with Aero titlebar support

Post by CatThief »

I added this theme code posted by Alfred...

Code: Select all

@media all and (-moz-windows-compositor) {
  #titlebar-buttonbox {
    display: none;
  }
  #main-window[chromemargin] {
    -moz-appearance: -moz-win-borderless-glass;
    background: transparent;
  }
  #main-window[chromemargin][inFullscreen="true"] {
    -moz-appearance: none;
  }
}

... but my Windows 7 tester said, "Everything looks good with this code, except when I put the tabs on top. The window control buttons go away when I do that", meaning the buttons disappear when the window is maximized and the tabs move into the titlebar.

I then tried applying custom buttons but that did not solve the issue. All this did was reserve a space for the buttons, and they were in fact functional, but they were invisible.

All I have is Windows XP and Linux. Everything is working fine there, but I can't for the life of me figure out how to implement the Aero fix for these titlebar buttons. Is there something else that is a part of browser.css that is critical to making this work?

It's crunch time and I'm afraid I'm going to have to abandon this theme for Fx4 over something that should not be that difficult to fix. Any help with this is appreciated more than you know!
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: No success with Aero titlebar support

Post by ShareBird »

I guess because you are explicitly removing the titlebar buttons with #titlebar-buttonbox { display: none }
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
CatThief
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Re: No success with Aero titlebar support

Post by CatThief »

Thanks for the suggestion, ShareBird, I'll see about getting it tested with that bit removed.
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.
User avatar
mcdavis
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Re: No success with Aero titlebar support

Post by mcdavis »

Seconding what ShareBird said. For glass only: don't set display:none on #titlebar-buttonbox, but do set it on all the .titlebar-button.

Also, you might want to make sure you're using -moz-appearance:-moz-window-button-box/-moz-window-button-box-maximized on #titlebar-buttonbox with glass. With glass, the size and position of #titlebar-buttonbox determines the transparent area that lets the system-drawn window caption buttons show through from behind.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed
User avatar
CatThief
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Re: No success with Aero titlebar support

Post by CatThief »

Thanks, mcdavis, I double-checked that I have that. Right now I'm working on making sense out of conflicting reports from two separate testers. On one hand everything is fine now. On the other hand the buttons are still missing.
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: No success with Aero titlebar support

Post by patrickjdempsey »

Make sure neither tester is using a custom OS theme... that could cause complications I think.
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
CatThief
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Re: No success with Aero titlebar support

Post by CatThief »

Thanks, Patrick, three people took a look at the finished product and I'm fairly certain nothing custom was used. I especially trust that mcdavis would be aware of inherent issues :wink: so I never even mentioned it. Yet it certainly is something to keep in mind if I receive any bug reports from other users.

Thank you EVERYONE for your help!
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: No success with Aero titlebar support

Post by KLB »

CatThief,

Could you post the final code solution you came up with to the aero issue we're all running into? It might help anyone who stumbles upon this thread in the future.
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
CatThief
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Re: No success with Aero titlebar support

Post by CatThief »

I placed this at the bottom of browser.css. (Just above it I inserted the titlebar code from the non-aero default theme's browser.css)

Code: Select all

/* Compatibility for Aero */ 
@media all and (-moz-windows-compositor) {
  #main-window {
    -moz-appearance: -moz-win-borderless-glass;
    background: transparent;
  }
  #main-window[inFullscreen="true"] {
    -moz-appearance: none;
  }
  /* These should be hidden w/ glass enabled. Windows draws its own buttons. */
  .titlebar-button {
    display: none;
  }
  #main-window[sizemode="maximized"] #titlebar-buttonbox {
    margin-right: 3px !important;
  }
  #main-window[sizemode="normal"] #appmenu-button {
    margin-top: 1px !important;
  }
  .titlebar-placeholder[type="caption-buttons"] {
    margin-left: 22px; /* additional space for Aero Snap */
  }
  #appcontent:not(:-moz-lwtheme) {
    background-color: -moz-Dialog;
  }
}
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: No success with Aero titlebar support

Post by KLB »

On behalf of every theme developer who smacks up against this issue a very big
Thanks! =D>
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: No success with Aero titlebar support

Post by patrickjdempsey »

You may also be interested in this KLB, I posted it in the other thread but it got buried pretty quickly. I didn't like how the XP Royale window-control buttons look against the off-white tab background so I changed the background color there, and then appended CatThief's code to revert it back for the Aero hack:

Code: Select all

/* window-control buttonbox tabs on top */
#main-window[sizemode="maximized"][tabsintitlebar="true"][tabsontop="true"] #titlebar-buttonbox {
  -moz-appearance: none;
  padding: 0px;  margin: 0px;
  background-color: ActiveCaption;
}
#main-window[sizemode="maximized"][tabsintitlebar="true"][tabsontop="true"]:-moz-window-inactive #titlebar-buttonbox {
  background-color: InactiveCaption;
}

/* Compatibility for Aero */
@media all and (-moz-windows-compositor) {
  #main-window {
    -moz-appearance: -moz-win-borderless-glass;
    background: transparent!important;
  }
  #main-window[inFullscreen="true"] {
    -moz-appearance: none;
  }
  #titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box;
  background-color: transparent;
  }
  #main-window[sizemode="maximized"][tabsintitlebar="true"][tabsontop="true"] #titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box-maximized;
   background-color: transparent;
  }
 
  /* These should be hidden w/ glass enabled. Windows draws its own buttons. */
  .titlebar-button {
    display: none;
  }
  #main-window[sizemode="maximized"] #titlebar-buttonbox {
    margin-right: 3px;
  }
  #main-window[sizemode="normal"] #appmenu-button {
    margin-top: 1px;
  }
  .titlebar-placeholder[type="caption-buttons"] {
    margin-left: 22px; /* additional space for Aero Snap */
  }
  #appcontent:not(:-moz-lwtheme) {
    background-color: -moz-Dialog;
  }
}
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: No success with Aero titlebar support

Post by KLB »

Awesome!

When I first tried Patrick's code my "Firefox" button and the minimize/maximize/restore/close buttons were really tiny in a cool way. Then they lost the tiny magic. I'd love to know what I did to make those buttons so much smaller?
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: No success with Aero titlebar support

Post by patrickjdempsey »

It's a bug in Firefox. You can reproduce it by changing your OS theme with the custom titlebar displayed.... 9 times out of 10 you will see really small buttons and the only way to fix it is to restart Firefox.
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: No success with Aero titlebar support

Post by KLB »

Damn, I'm sure those small buttons would be really popular with some of my theme's users.

BTW, I'm getting a report that this fix and possibly the default FF4 theme are causing conflicts with the extension Hide Caption Titlebar Plus (Smart) 2.1.7rc. I can't test this myself, but you can see the notes about this from the user SvEgiiVEteR at: viewtopic.php?f=18&t=2139611&start=45
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: No success with Aero titlebar support

Post by patrickjdempsey »

KLB, I was thinking the exact same thing the first time I saw it! Man, how can I get those for Stratini!

I'm not surprised about Hide Caption Titlebar... the author of that extension is going to need to be very careful about how he does things if he wants to support 3rd party themes, especially for those of us not supporting Glass.
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/
Post Reply