mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
qt: make console buttons look clickable
Change the type for the console's buttons to QToolButton which will make them look explicitly clickable, which in turn fixes the small hitbox issue for macOS. With this change, we need to generalize the respective action connect logic from QPushButton to QAbstractButton. While here, update width and height of icon for consistency with other tool buttons.
This commit is contained in:
@@ -470,13 +470,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="fontSmallerButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QToolButton" name="fontSmallerButton">
|
||||
<property name="toolTip">
|
||||
<string>Decrease font size</string>
|
||||
</property>
|
||||
@@ -489,26 +483,14 @@
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16</height>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="fontBiggerButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QToolButton" name="fontBiggerButton">
|
||||
<property name="toolTip">
|
||||
<string>Increase font size</string>
|
||||
</property>
|
||||
@@ -521,26 +503,14 @@
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16</height>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QToolButton" name="clearButton">
|
||||
<property name="toolTip">
|
||||
<string>Clear console</string>
|
||||
</property>
|
||||
@@ -554,15 +524,15 @@
|
||||
<iconset resource="../bitcoin.qrc">
|
||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+L</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <wallet/wallet.h>
|
||||
#endif
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QDateTime>
|
||||
#include <QFont>
|
||||
#include <QKeyEvent>
|
||||
@@ -503,9 +504,9 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||
ui->lineEdit->setMaxLength(16 * 1024 * 1024);
|
||||
ui->messagesWidget->installEventFilter(this);
|
||||
|
||||
connect(ui->clearButton, &QPushButton::clicked, [this] { clear(); });
|
||||
connect(ui->fontBiggerButton, &QPushButton::clicked, this, &RPCConsole::fontBigger);
|
||||
connect(ui->fontSmallerButton, &QPushButton::clicked, this, &RPCConsole::fontSmaller);
|
||||
connect(ui->clearButton, &QAbstractButton::clicked, [this] { clear(); });
|
||||
connect(ui->fontBiggerButton, &QAbstractButton::clicked, this, &RPCConsole::fontBigger);
|
||||
connect(ui->fontSmallerButton, &QAbstractButton::clicked, this, &RPCConsole::fontSmaller);
|
||||
connect(ui->btnClearTrafficGraph, &QPushButton::clicked, ui->trafficGraph, &TrafficGraphWidget::clear);
|
||||
|
||||
// disable the wallet selector by default
|
||||
|
||||
Reference in New Issue
Block a user