From fd51f4b066d29e87e761c1efa262b45bc989c274 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 5 Jun 2025 14:09:16 +1000 Subject: [PATCH 1/2] Revert "Revert "Attempt to resurrect dropdown color button screenshot"" This reverts commit 717cc523fc0b3c5b7af73b731d3ec91217303f27. --- screenshots/gui/qgscolorbutton.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/screenshots/gui/qgscolorbutton.py b/screenshots/gui/qgscolorbutton.py index 0d4d951152fd..ced125708e02 100644 --- a/screenshots/gui/qgscolorbutton.py +++ b/screenshots/gui/qgscolorbutton.py @@ -14,11 +14,10 @@ def __generate_screenshots(dest_path: Path): im = ScreenshotUtils.capture_widget(widget, width=200) im.save((dest_path / "color_button.png").as_posix()) - # triggers a crash in qgis! (requires https://github.com/qgis/QGIS/pull/61600) - # im = ScreenshotUtils.capture_toolbutton_with_dropdown(widget, width=250) - # im.save((dest_path / "color_button_expanded.png").as_posix()) + im = ScreenshotUtils.capture_toolbutton_with_dropdown(widget, width=250) + im.save((dest_path / "color_button_expanded.png").as_posix()) return { "color_button.png": "QgsColorButton in a default state", - # "color_button_expanded.png": "QgsColorButton showing drop down menu", + "color_button_expanded.png": "QgsColorButton showing drop down menu", } From a6d9b4e044a47893038770877c1eb2c76ff27b7c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 5 Jun 2025 14:09:16 +1000 Subject: [PATCH 2/2] Revert "Revert "Fix width"" This reverts commit 8a907f31eb6be1702c8e4985302180b8396f11ea. --- screenshots/gui/qgscolorbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshots/gui/qgscolorbutton.py b/screenshots/gui/qgscolorbutton.py index ced125708e02..f6fbf6c775fa 100644 --- a/screenshots/gui/qgscolorbutton.py +++ b/screenshots/gui/qgscolorbutton.py @@ -14,7 +14,7 @@ def __generate_screenshots(dest_path: Path): im = ScreenshotUtils.capture_widget(widget, width=200) im.save((dest_path / "color_button.png").as_posix()) - im = ScreenshotUtils.capture_toolbutton_with_dropdown(widget, width=250) + im = ScreenshotUtils.capture_toolbutton_with_dropdown(widget, width=200) im.save((dest_path / "color_button_expanded.png").as_posix()) return {