From d150d8f2b7e07a0f0dc8f2c9657df2f55d9e66f2 Mon Sep 17 00:00:00 2001 From: William Pearson Date: Tue, 11 Apr 2023 16:25:34 -0700 Subject: [PATCH] Use instant popup for shader execute forwards/backwards buttons There is no action associated with clicking the button itself, only for the menu associated with it. Using QToolButton::MenuButtonPopup means that the majority of the button is for the button's own action, and there is a small arrow next to the button that shows the menu. Since there's no action, this means that the small menu arrow needs to be clicked each time instead of the big button, which is annoying. QToolButton::InstantPopup instead always shows the menu (though it doesn't have the arrow indicating a menu exists, although this is not particularly important). InstantPopup is also already used for the "Insert" button used when editing a custom shader for the texture viewer. MenuButtonPopup is used in many other places throughout RenderDoc, but they are all save or export buttons where there is a meaningful default action. --- qrenderdoc/Windows/ShaderViewer.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/ShaderViewer.ui b/qrenderdoc/Windows/ShaderViewer.ui index 8e4bf383b..989ab02d4 100644 --- a/qrenderdoc/Windows/ShaderViewer.ui +++ b/qrenderdoc/Windows/ShaderViewer.ui @@ -439,7 +439,7 @@ :/control_reverse_blue@2x.png:/control_reverse_blue@2x.png - QToolButton::MenuButtonPopup + QToolButton::InstantPopup Qt::ToolButtonTextBesideIcon @@ -462,7 +462,7 @@ :/control_play_blue.png:/control_play_blue.png - QToolButton::MenuButtonPopup + QToolButton::InstantPopup Qt::ToolButtonTextBesideIcon