Open Bug 929986 Opened 11 years ago Updated 2 years ago

Light weight themes are not aligned correctly with the Win8 caption buttons

Categories

(Core :: Widget: Win32, defect, P4)

x86_64
Windows 8
defect

Tracking

()

People

(Reporter: c.ascheberg, Unassigned, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=c++][tpi:+])

Attachments

(2 files)

Attached image LWT.jpg
Lightweight themes are not correctly aligned at captions buttons on Win 8 and 8.1, see screenshot:
- the area to the left of the minimize button is not covered by the LWT
- one pixel of the close button is replaced
Component: Theme → Widget: Win32
Product: Firefox → Core
Attached image Another example
Screenshot was taken with pointer hovering over minimize button.
The sliver of blue on the left side of the minimize button is the titlebar color as defined in Windows 8.x.  Instead of extending the hovered minimize button to overlay this extra slice of the titlebar I think making it the color of the LWT is the way to go.  This way it will act like normal, i.e., no LWT.
Mentor: jmathies, tabraldes, netzen, matt.woodrow
Summary: LWT not correctly aligned at captions buttons → Light weight themes are not aligned correctly with the Win8 caption buttons
Whiteboard: [good first bug][lang=c++]
Hi everyone; I would like to work on this as my first attempt at fixing a bug. If you could assign it to me and help me through the process I would appreciate it, thank you.
Flags: needinfo?(jmathies)
(In reply to arcson from comment #3)
> Hi everyone; I would like to work on this as my first attempt at fixing a
> bug. If you could assign it to me and help me through the process I would
> appreciate it, thank you.

Hey, thanks. First off, are you able to reproduce the bug?
Assignee: nobody → arcson
Flags: needinfo?(jmathies)
I am working on that right now; I have Win7 will I still be able to work on this bug if it's Win8 only?
(In reply to arcson from comment #5)
> I am working on that right now; I have Win7 will I still be able to work on
> this bug if it's Win8 only?

I don't think so, it looks like the problem is we chose a shape for the area of these buttons, but on win8 the win7 shape doesn't match.

The actual shape is cut out here - 
http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp#3588
Would we need to identify in UpdateThemeGeometries if the OS is Win8 and choose a different shape area for the buttons?
Flags: needinfo?(jmathies)
(In reply to arcson from comment #7)
> Would we need to identify in UpdateThemeGeometries if the OS is Win8 and
> choose a different shape area for the buttons?

sorry, missed this comment. please use needinfo in the future.

Yes, that's exactly what I think we'll need to do.
Flags: needinfo?(jmathies)
Using this code on Windows 8+ optimizes 'min-button' btw. 'button box' ui.

#titlebar:-moz-lwtheme #titlebar-buttonbox {
  -moz-margin-end:-5px !important;
}

Result
http://i.imgur.com/FFE2Bqr.png
(In reply to Jim Mathies [:jimm] from comment #6)
> (In reply to arcson from comment #5)
> > I am working on that right now; I have Win7 will I still be able to work on
> > this bug if it's Win8 only?
> 
> I don't think so, it looks like the problem is we chose a shape for the area
> of these buttons, but on win8 the win7 shape doesn't match.
> 
> The actual shape is cut out here - 
> http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.
> cpp#3588

Hi,

Is the following to location of the file that needs to be modified?
mozilla-central/source/widget/windows/nsWindow.cpp

Thank You
Flags: needinfo?(jmathies)
(In reply to arcson from comment #7)
> Would we need to identify in UpdateThemeGeometries if the OS is Win8 and
> choose a different shape area for the buttons?

yes, you can find the current location using a code search - 

https://dxr.mozilla.org/mozilla-central/search?q=UpdateThemeGeometries&redirect=false&case=false
Flags: needinfo?(jmathies)
Assignee: arcson → nobody
Mentor: matt.woodrow, netzen, timabraldes
Priority: -- → P4
Whiteboard: [good first bug][lang=c++] → [good first bug][lang=c++][tpi:+]
Hello,
I would like to work on this bug. However i am a first timer, so i ll need some help.
Hi,
Can i work on this bug as my first bug!

I'm also interested in this!

Keywords: good-first-bug
Whiteboard: [good first bug][lang=c++][tpi:+] → [lang=c++][tpi:+]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: