MozillaZine

Themes rejected.. window controls and titlebar theming.

Discuss application theming and theme development.
Adeneba

User avatar
 
Posts: 15
Joined: April 28th, 2010, 2:13 pm

Post Posted July 23rd, 2010, 12:31 am

It doesn't seems to give any result Patrick (tried on vista).

patrickjdempsey

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

Post Posted July 23rd, 2010, 1:46 am

Thanks, it was worth a shot. Unfortunately the author doesn't give any way to contact him. I've made a review of that theme asking him to contact me me to ask some questions, so we shall see how that pans out.
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: 22727
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted August 11th, 2010, 1:27 am

OK guys, now that drawing in the the title-bar has finally landed, the proper controls are now appearing in the default theme instructions. Apparently, you need the following *MINIMUM* lines for everything to follow the OS theme. I played around with the window control buttons and yes you can change them with -moz-appearance:none; and then define an image for them. Which means yes, we can now have OS-replicating themes easily!

Code: Select all
#titlebar {
  -moz-appearance: -moz-window-titlebar;
  margin-left: -15px;
  margin-right: -15px;}

#main-window[sizemode="maximized"] > #titlebar {
  -moz-appearance: -moz-window-titlebar-maximized;}

#titlebar-content {
  margin-left: 15px;
  margin-right: 15px;
}

#titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box;}

#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box-maximized;}


#titlebar-min {
  -moz-appearance: -moz-window-button-minimize;}

#titlebar-max {
  -moz-appearance: -moz-window-button-maximize;}

#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox > #titlebar-max {
  -moz-appearance: -moz-window-button-restore;}

#titlebar-close {
  -moz-appearance: -moz-window-button-close;}


There is one bug though. I'm getting about 2px white strip above the titlebar. It's very strange and I tried literally dozens of things to kill it. This is the only fix I could discover:

Code: Select all
#main-window {
margin-top: -2px;
padding-top: 0px;
}
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/

akayser

User avatar
 
Posts: 296
Joined: August 25th, 2010, 12:44 am

Post Posted August 26th, 2010, 12:08 pm

This bug enabled the 'drawintitlebar' thing for Windows XP:
Bug 575870 - Enable the firefox button on xp themed, classic, and aero basic.

Note, the XUL attribute chromemargin:0,-1,-1,-1 is used on the '#main-window', so only the top part of the windows frame is now removed, but applying chromemargin:0,0,0,0 removes all windows frame (like the HideCaption does).

May be someone can hack a quick extension or jetpack to change chromemargin:0,-1,-1,-1 to chromemargin:0,0,0,0 for that want to style the other window borders as well?
Creator of the LittleFox, LittleBird, MicroFox, MicroBird, Nautipolis, Walnut, Walnut2, Bricks and Metal themes for Firefox and Thunderbird.
Visit https://addons.mozilla.org/en-US/firefox/addon/123/developers. Mozilla contributor since October 1999 (Mozilla M10).

akayser

User avatar
 
Posts: 296
Joined: August 25th, 2010, 12:44 am

Post Posted August 26th, 2010, 12:15 pm

Screenshot of Nautipolis with 'drawintitlebar' on Windows XP
Image
Creator of the LittleFox, LittleBird, MicroFox, MicroBird, Nautipolis, Walnut, Walnut2, Bricks and Metal themes for Firefox and Thunderbird.
Visit https://addons.mozilla.org/en-US/firefox/addon/123/developers. Mozilla contributor since October 1999 (Mozilla M10).

patrickjdempsey

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

Post Posted August 26th, 2010, 1:32 pm

Alfred, it seems like that could be done with a binding without need for an extension? Also, do you know if the latest iteration of "fix" allows for drawing in the titlebar when the menu is shown? And are we going to get a title in the titlebar (what a strange question)?
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/

akayser

User avatar
 
Posts: 296
Joined: August 25th, 2010, 12:44 am

Post Posted September 14th, 2010, 10:35 pm

What I get from the bugzilla bugs on this topic, is that they consider the title in the selected tab as the display of the title.

Can someone help me with another titlebar related problem:
http://imagepaste.nullnetwork.net/img/1284488500Untitled.png
This is image is from one of the AMO reviewers, rejecting my theme.

On Win 7, with Aero enabled a black box appears above my custom titlebar styling. It looks like that Windows is still trying to paint something in the titlebar area. How can this be removed?

(edit: inline image removed so that we have a smaller forum)
Last edited by akayser on September 16th, 2010, 1:50 am, edited 1 time in total.
Creator of the LittleFox, LittleBird, MicroFox, MicroBird, Nautipolis, Walnut, Walnut2, Bricks and Metal themes for Firefox and Thunderbird.
Visit https://addons.mozilla.org/en-US/firefox/addon/123/developers. Mozilla contributor since October 1999 (Mozilla M10).

patrickjdempsey

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

Post Posted September 14th, 2010, 11:09 pm

Yeah, welcome to the nightmare that is reviewers who don't seem to understand that themes cannot possibly be responsible for piles of shit they did not create.
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/

mcdavis

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

Post Posted September 15th, 2010, 12:26 am

Mine looks the same ... no border on top ([chromeMargin="0,-1,-1,-1"]) but also the black rectangle where the window controls would be. I haven't tried to solve it yet.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

mcdavis

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

Post Posted September 15th, 2010, 1:19 am

We could try playing around with something like this:

Code: Select all
#main-window {
  -moz-appearance: -moz-win-borderless-glass !important;
  background: url("chrome://global/skin/default-window-gradient-bg.png") repeat-x 0px -30px #181818 !important;
}

toolbox {
  background: url("chrome://global/skin/default-window-gradient-bg.png") repeat-x 0px -30px #181818 !important;
}


That restores the window controls. It also (as a consequence of -moz-win-borderless-glass, apparently) sets the background color (not image, just color) for window and toolbox to something glass-related, which is why I reapplied the background image.

I'd rather see an implementation of -moz-appearance: none that skips the black box. That seems like the kind of thing that could possibly be easy for Jim M ("Mr. nsWindows.cpp") to implement if it were just pointed out that it's a problem. I can't think of a case where that would be wanted.

Has anybody tried changing values for chromeMargin with a binding? That might eliminate the need for a companion add-on to control chromeMargin.

EDIT: For the record, I'm on Vista, seeing the same thing you're seeing on Win7.
Last edited by mcdavis on September 15th, 2010, 1:52 am, edited 2 times in total.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

akayser

User avatar
 
Posts: 296
Joined: August 25th, 2010, 12:44 am

Post Posted September 15th, 2010, 1:36 am

Tracked the black box issue to Bug 575870 - Implement the firefox button on xp, classic, and aero basic
which added the following
Code: Select all
     1.6  @media all and (-moz-windows-compositor) {
     1.7 +  /* these should be hidden w/glass enabled. windows draws it's own buttons. */
     1.8 +  #titlebar-buttonbox {
     1.9 +    display: none;
    1.10 +  }
. What I deduce from this is that on Win7/Vista with Glass enabled (which I don't have access to), the caption buttons are draw always (even if one wants to style the button box yourself).

Furthermore, there seems to be some painting issues with these caption buttons in Bug 595589 - caption buttons are not rendered correctly, and Aero missing..

The real cause seems to be this one: Bug 554982 - Current Aero implementation is using default Aero borders in main window.
When glass is enabled, it does some special painting / double buffering, requiring -moz-win-borderless-glass, to get correct rendering of the system caption buttons (which are always drawn in glass/compositor mode. I consider this a bug, but I guess support to get it fixed will be low, as it is not for the default theme...

Posted Bug 596516 - On glass, the caption button box gets rendered black if #main-window is not -moz-win-borderless-glass... for this issue. Please vote and comment there.

(edit: link fixed).
Last edited by akayser on September 16th, 2010, 1:50 am, edited 1 time in total.
Creator of the LittleFox, LittleBird, MicroFox, MicroBird, Nautipolis, Walnut, Walnut2, Bricks and Metal themes for Firefox and Thunderbird.
Visit https://addons.mozilla.org/en-US/firefox/addon/123/developers. Mozilla contributor since October 1999 (Mozilla M10).

patrickjdempsey

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

Post Posted September 15th, 2010, 6:43 am

akayser wrote: Bug 596516


Just fixing your link. ;) Unfortunately I have no way of testing any of this at this time. I'm also noticing in the screenshot mcdavis posted in that bug that the top Glass border is missing... I'm assuming that is fixed by a -moz-appearance? Do you know if there are any related styling issues in Linux or OSX? I noticed yesterday on my machine at work that the App button looks *awful* in Windows 2000 as the window border has a bevel and shouldn't really be overlapped... I'm betting there are Linux Appearances with similar problems. It would be nice if we can get a compendium of these bugs, what they look like and how to fix them, as this is going to be a nightmare for individual themers to figure out on their own.
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: 22727
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted September 15th, 2010, 6:59 am

Hmmm... I don't think this snippet of code is actually working in my theme, although it does appear to work in the default theme:

Code: Select all
/* aesthetic - push the fx button off the top window border */
@media not all and (-moz-windows-classic) {
  #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
    margin-top: 1px;  }
  #appmenu-button {
  -moz-border-radius-bottomleft: 0px;
  -moz-border-radius-bottomright: 0px; }
}
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/

mcdavis

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

Post Posted September 15th, 2010, 8:40 am

patrickjdempsey wrote:I'm also noticing in the screenshot mcdavis posted in that bug that the top Glass border is missing... I'm assuming that is fixed by a -moz-appearance?


That's from the chomreWindow attribute. If you go to DOM Inspector, you can right-click that attribute and edit it to show/hide borders. The only meaningful values for each border are (IIRC) -1 and 0. (Why negative? I wonder. Maybe it corresponds to some value sent to the Windows frame-and=border-drawing API.)

There's also hidechrome: https://developer.mozilla.org/en/XUL/At ... hidechrome

Do you know if there are any related styling issues in Linux or OSX?


I haven't tried yet. I'm betting a lot of these are specific to windows.

It would be nice if we can get a compendium of these bugs, what they look like and how to fix them


I'll be posting whatever I learn.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

Zigboom

User avatar
 
Posts: 475
Joined: April 22nd, 2009, 5:09 am

Post Posted September 18th, 2010, 5:34 am

Hi guys,

I'm joining the club of the rejected theme authors, what a nasty bug...I knew that it isn't so smart to mess with the window frames&buttons, there are many problems that can rise (for example using applications as WindowBlinds etc.)

Anyway, I have one question: Can anyone please explain how can it be that the default theme works (if it really does), while our themes fail? I'm using the exact code as in the default Minefield theme to style the window frame so I cannot understand how my theme got rejected.
I don't have access to Win7 with Glass so I cannot investigate.

Thanks and good luck to all of us.
-=# LavaFox & Black Fox - Dark & hot themes for Firefox #=-
https://addons.mozilla.org/en-US/firefox/user/4710003/

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 1 guest