[vlc-commits] [Git][videolan/vlc][master] qt/messages: fix lack of focus border on button

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sat Feb 19 19:30:16 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
72dee53e by Lyndon Brown at 2022-02-19T18:10:10+00:00
qt/messages: fix lack of focus border on button

The update/clear icon-based button here gives no indication that it has
the focus if you tab to it via keyboard navigation. Switching the button
type from `QPushButton` to `QToolButton` fixes this.

Note that the similar button in the sync tab of the effects dialog is of
type `QToolButton` and did not exhibit the problem.

(Non-functional change; no other change in appearance).

- - - - -


2 changed files:

- modules/gui/qt/dialogs/messages/messages.cpp
- modules/gui/qt/dialogs/messages/messages.hpp


Changes:

=====================================
modules/gui/qt/dialogs/messages/messages.cpp
=====================================
@@ -100,8 +100,9 @@ MessagesDialog::MessagesDialog( qt_intf_t *_p_intf)
     ui.filterEdit->setText( getSettings()->value( "messages-filter" ).toString() );
     getSettings()->endGroup();
 
-    updateButton = new QPushButton( QIcon(":/update.svg"), "" );
-    updateButton->setFlat( true );
+    updateButton = new QToolButton;
+    updateButton->setIcon( QIcon(":/update.svg") );
+    updateButton->setAutoRaise( true );
     ui.mainTab->setCornerWidget( updateButton );
 
 #ifndef NDEBUG


=====================================
modules/gui/qt/dialogs/messages/messages.hpp
=====================================
@@ -67,7 +67,7 @@ private:
     void buildTree( QTreeWidgetItem *, vlc_object_t * );
 
     friend class    Singleton<MessagesDialog>;
-    QPushButton *updateButton;
+    QToolButton *updateButton;
     QMutex messageLocker;
 #ifndef NDEBUG
     QTreeWidget *pldebugTree;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/72dee53e4a4943dc483efe16234a30777c291071

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/72dee53e4a4943dc483efe16234a30777c291071
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list