From 22f017283b53faeaa8b4c835a213749e39c5c74c Mon Sep 17 00:00:00 2001 From: Garux Date: Mon, 21 Aug 2023 15:41:07 +0600 Subject: [PATCH] change browse file/directory icon from SP_FileDialogStart to semantically correct SP_DialogOpenButton --- contrib/prtview/LoadPortalFileDialog.cpp | 2 +- libs/gtkutil/dialog.cpp | 2 +- radiant/entityinspector.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index 7d62793f..1f6f97fd 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -52,7 +52,7 @@ bool DoLoadPortalFileDialog(){ auto vbox = new QVBoxLayout( &dialog ); { vbox->addWidget( line = new QLineEdit ); - auto button = line->addAction( QApplication::style()->standardIcon( QStyle::SP_FileDialogStart ), QLineEdit::ActionPosition::TrailingPosition ); + auto button = line->addAction( QApplication::style()->standardIcon( QStyle::SP_DialogOpenButton ), QLineEdit::ActionPosition::TrailingPosition ); QObject::connect( button, &QAction::triggered, [line](){ if ( const char* filename = GlobalRadiant().m_pfnFileDialog( g_pRadiantWnd, true, "Locate portal (.prt) file", line->text().toLatin1().constData(), 0, true, false, false ) ) line->setText( filename ); diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 95d7d4bb..983666dc 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -49,7 +49,7 @@ RadioHBox RadioHBox_new( StringArrayRange names ){ PathEntry PathEntry_new(){ auto entry = new QLineEdit; - auto button = entry->addAction( QApplication::style()->standardIcon( QStyle::SP_FileDialogStart ), QLineEdit::ActionPosition::TrailingPosition ); + auto button = entry->addAction( QApplication::style()->standardIcon( QStyle::SP_DialogOpenButton ), QLineEdit::ActionPosition::TrailingPosition ); return PathEntry( entry, button ); } diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index 4d3fd257..4218bfa5 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -247,7 +247,7 @@ class ModelAttribute final : public EntityAttribute ModelAttribute( const char* key ) : m_key( key ), m_entry( new NonModalEntry( ApplyCaller( *this ), UpdateCaller( *this ) ) ){ - auto button = m_entry->addAction( QApplication::style()->standardIcon( QStyle::SP_FileDialogStart ), QLineEdit::ActionPosition::TrailingPosition ); + auto button = m_entry->addAction( QApplication::style()->standardIcon( QStyle::SP_DialogOpenButton ), QLineEdit::ActionPosition::TrailingPosition ); QObject::connect( button, &QAction::triggered, [this](){ browse(); } ); } void release() override {