Closed Bug 1521312 Opened 5 years ago Closed 5 years ago

Titlebar window controls are too close to window edge after overriding reversed placement when ui.GtkCSDReversedPlacement is set

Categories

(Core :: Widget: Gtk, defect)

66 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- unaffected
firefox66 --- disabled
firefox67 --- fixed

People

(Reporter: ke5trel, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

After correcting Bug 1521310 on Ubuntu 18.10 by creating ui.GtkCSDReversedPlacement = 0 and restarting, the window controls are too close to the edge of the window. The titlebar-buttonbox has a 7px border on the left side when it should be on the right side.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=529a105310435244ef67c078a810ad92b22d9327&tochange=7d151a27de64cce8b0ed96443c1888656341e420

Regressed by: Bug 1433667

No longer blocks: gtktitlebar, 1433667
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Problem still exists after Bug 1519606 when using ui.GtkCSDReversedPlacement to override placement.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Attached image border-wrong-side.png

:jimm, do you think this will need to be fixed for beta 66?

Flags: needinfo?(jmathies)

(In reply to Tim Spurway [:tspurway] from comment #4)

:jimm, do you think this will need to be fixed for beta 66?

More of a UX decision, feels like polish but it does seem pretty jaring. Maybe Martin can give us an opinion here.

Flags: needinfo?(jmathies) → needinfo?(stransky)

Can you provide a full reproduction steps for latest nightly? Because I can't reproduce that. Setting ui.GtkCSDReversedPlacement has no effect and switching left/right button placement works correctly (after browser restart).

ui.GtkCSDReversedPlacement toggle without browser restart does not trigger on-theme-change event so the button borders are not regenerated for the reversed placement. But I don't think ui.GtkCSDReversedPlacement should be even used for that.

Flags: needinfo?(stransky) → needinfo?(ke5trel)
Assignee: nobody → stransky

STR1:

  1. Ubuntu 18.10 Yaru theme (controls on right by default), go to about:config and create ui.GtkCSDReversedPlacement = 1.
  2. Restart browser.
  3. Placement is reversed (left side) but 7px border padding is on right side.

STR2:

  1. Ubuntu 18.10 Yaru theme, use Tweaks to put controls on left, go to about:config and create ui.GtkCSDReversedPlacement = 0.
  2. Restart browser.
  3. Placement is reversed (right side) but 7px border padding is on left side.
Flags: needinfo?(ke5trel)

I think the ui.GtkCSDReversedPlacement should be removed as the preference is loaded from system settings.

When ui.GtkCSDReversedPlacement is set only ans system used a different icont placement the buttons borders are calculated incorrectly as code at toolkit level is not aware of the ui.GtkCSDReversedPlacement variable.

Is the ui.GtkCSDReversedPlacement needed anyway?

Summary: Titlebar window controls are too close to window edge after overriding reversed placement → Titlebar window controls are too close to window edge after overriding reversed placement when ui.GtkCSDReversedPlacement is set

The hidden ui prefs are intended to override system settings which can be useful for customization and troubleshooting. They are not expected to work flawlessly so I would be more inclined to keep the pref and WONTFIX the cosmetic issue.

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de00632953fa
[Linux/Gtk+] Remove ui.GtkCSDReversedPlacement as it's broken and useless r=dao

Keywords: checkin-needed

(In reply to Kestrel from comment #10)

The hidden ui prefs are intended to override system settings which can be
useful for customization and troubleshooting. They are not expected to work
flawlessly so I would be more inclined to keep the pref and WONTFIX the
cosmetic issue.

Toggle ui.GtkCSDReversedPlacement without EnsureToolbarMetrics() from gtk3drawing.cpp re-call is generally wrong as the titlebar layout is not updated and just the css styles are shifted so IMHO it's better to remove it.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Should we get this on 66?

Flags: needinfo?(stransky)

(In reply to Julien Cristau [:jcristau] from comment #14)

Should we get this on 66?

No, the ui.GtkCSDReversedPlacement is not exposed anywhere and was included for testing purposes. Thanks.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: