MozillaZine

No success with Aero titlebar support

Discuss application theming and theme development.
CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted March 13th, 2011, 11:12 am

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.

ShareBird

User avatar
 
Posts: 2700
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted March 13th, 2011, 1:42 pm

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.

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted March 13th, 2011, 2:08 pm

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.

mcdavis

User avatar
 
Posts: 3111
Joined: December 9th, 2005, 5:51 am

Post Posted March 13th, 2011, 2:32 pm

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

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted March 13th, 2011, 7:50 pm

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.

patrickjdempsey

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

Post Posted March 15th, 2011, 12:38 am

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/

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted March 15th, 2011, 11:53 am

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.

KLB

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

Post Posted March 24th, 2011, 6:26 pm

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)

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted March 24th, 2011, 6:58 pm

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.

KLB

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

Post Posted March 24th, 2011, 7:18 pm

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)

patrickjdempsey

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

Post Posted March 24th, 2011, 8:27 pm

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/

KLB

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

Post Posted March 25th, 2011, 10:29 am

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)

patrickjdempsey

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

Post Posted March 25th, 2011, 10:18 pm

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/

KLB

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

Post Posted March 26th, 2011, 6:32 am

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)

patrickjdempsey

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

Post Posted March 26th, 2011, 1:45 pm

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/

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 1 guest