v0.91.1: now-playing panel debossed again; window rim 1 px heavier and kept when maximized; square corners when tiled

This commit is contained in:
2026-11-08 01:09:02 -08:00
parent 435a082dc5
commit 38f300bca7
4 changed files with 68 additions and 11 deletions
+22 -2
View File
@@ -52,11 +52,31 @@ def test_no_line_under_the_title_bar(installed):
dialog.close()
def test_maximized_corners_are_square(installed):
def test_maximized_and_tiled_corners_are_square(installed, monkeypatch):
dialog = _dialog()
dialog.setWindowState(Qt.WindowState.WindowMaximized)
QApplication.processEvents()
assert not title_bar(dialog)._frame.isVisible()
assert titlebar._radius(dialog) == 0
# The emboss stays, as in routine-widget.
assert title_bar(dialog)._frame.isVisible()
dialog.setWindowState(Qt.WindowState.WindowNoState)
QApplication.processEvents()
assert titlebar._radius(dialog) == titlebar.RADIUS
monkeypatch.setattr(titlebar, "tiled", lambda window: True)
assert titlebar._radius(dialog) == 0
dialog.close()
def test_a_child_styled_before_it_had_a_parent_still_paints(installed):
from PyQt6.QtWidgets import QFrame
frame = QFrame() # parentless: polishing it sees a window
frame.setStyleSheet("QFrame { background: #ff0000; }")
frame.ensurePolished()
dialog = _dialog()
dialog.layout().addWidget(frame)
assert not frame.testAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
frame.resize(40, 20)
assert frame.grab().toImage().pixelColor(20, 10).name() == "#ff0000"
dialog.close()