aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2021-01-28 10:16:51 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2021-01-28 10:16:55 +0100
commit68692d33c6c51e4d0e873d2626ff25567432c71e (patch)
tree8c4b79c525eca80ab1fa10cdd525fbb966762c5c /src/qt/guiutil.h
parent759518354377a653feb7dee171cbabe365d32384 (diff)
parentac7ccd67d7f2b09e36dd57405f899e4698dd3d78 (diff)
downloadbitcoin-68692d33c6c51e4d0e873d2626ff25567432c71e.tar.xz
Merge bitcoin-core/gui#85: Remove unused "What's This" button in dialogs on Windows OS
ac7ccd67d7f2b09e36dd57405f899e4698dd3d78 scripted-diff: Remove unused "What's This" button in dialogs on Windows (Hennadii Stepanov) b6951483ecdd4409a0e1d492c93bcd4d823f039d qt: Add flags to prevent a "What's This" button on Windows OS (Hennadii Stepanov) Pull request description: Fix #74. From [Qt docs](https://doc.qt.io/qt-5/qdialog.html#QDialog): > The widget flags _f_ are passed on to the `QWidget` constructor. If, for example, you don't want a **What's This** button in the title bar of the dialog, pass `Qt::WindowTitleHint | Qt::WindowSystemMenuHint` in _f_. Screenshot on Windows 10 (2004): - master (3ba25e3bdde3464eed5d2743d68546e48b005544) ![Screenshot from 2020-09-07 16-55-42](https://user-images.githubusercontent.com/32963518/92402384-20dc6a00-f138-11ea-9dcb-3e0f6373ff22.png) - this PR (e322fe7e19ac504272d14b9b4f9b28b13df888ed) ![Screenshot from 2020-09-07 18-31-16](https://user-images.githubusercontent.com/32963518/92402509-5aad7080-f138-11ea-8b63-9bbbf8b9b9e1.png) ACKs for top commit: Bosch-0: tACK ac7ccd67d7f2b09e36dd57405f899e4698dd3d78 Tested on Windows 10.0.18363 Build 18363. promag: Code review ACK ac7ccd67d7f2b09e36dd57405f899e4698dd3d78 but with some suggestions. jonasschnelli: utACK ac7ccd67d7f2b09e36dd57405f899e4698dd3d78 Tree-SHA512: f6750a17b7203106cb4db5870becba1cef6a505d4edcc710ba131338bd3aae051510627e62c9bcb8345a7f497c614709e11aeb8f6ae3ea85967bbce2a8c69e64
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r--src/qt/guiutil.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index fcde439307..edfb5b13a2 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -45,6 +45,9 @@ QT_END_NAMESPACE
*/
namespace GUIUtil
{
+ // Use this flags to prevent a "What's This" button in the title bar of the dialog on Windows.
+ constexpr auto dialog_flags = Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
+
// Create human-readable string from date
QString dateTimeStr(const QDateTime &datetime);
QString dateTimeStr(qint64 nTime);