guiconstants.h raw
1 // Copyright (c) 2011-2022 The Limenka developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef LIMENKA_QT_GUICONSTANTS_H
6 #define LIMENKA_QT_GUICONSTANTS_H
7
8 #include <chrono>
9 #include <cstdint>
10
11 using namespace std::chrono_literals;
12
13 /* A delay between model updates */
14 static constexpr auto MODEL_UPDATE_DELAY{250ms};
15
16 /* A delay between shutdown pollings */
17 static constexpr auto SHUTDOWN_POLLING_DELAY{200ms};
18
19 /* AskPassphraseDialog -- Maximum passphrase length */
20 static const int MAX_PASSPHRASE_SIZE = 1024;
21
22 /* LimenkaGUI -- Size of icons in status bar */
23 static const int STATUSBAR_ICONSIZE = 16;
24
25 static const bool DEFAULT_SPLASHSCREEN = true;
26
27 /* Invalid field background style */
28 #define STYLE_INVALID "border: 3px solid #FF8080"
29 /* "Warning" field background style */
30 #define STYLE_INCORRECT "border: 3px solid #FFFF80"
31 /* Background style for active search in NetWatch */
32 #define STYLE_ACTIVE "border: 3px solid #80FF80"
33
34 /* Transaction list -- unconfirmed transaction */
35 #define COLOR_UNCONFIRMED QColor(128, 128, 128)
36 /* Transaction list -- negative amount */
37 #define COLOR_NEGATIVE QColor(255, 0, 0)
38 /* Transaction list -- bare address (without label) */
39 #define COLOR_BAREADDRESS QColor(140, 140, 140)
40 /* Transaction list -- TX status decoration - danger, tx needs attention */
41 #define COLOR_TX_STATUS_DANGER QColor(200, 100, 100)
42 /* Transaction list -- TX status decoration - default color */
43 #define COLOR_BLACK QColor(0, 0, 0)
44
45 /* Tooltips longer than this (in characters) are converted into rich text,
46 so that they can be word-wrapped.
47 */
48 static const int TOOLTIP_WRAP_THRESHOLD = 80;
49
50 /* Number of frames in spinner animation */
51 #define SPINNER_FRAMES 36
52
53 #define QAPP_ORG_NAME "Limenka"
54 #define QAPP_ORG_DOMAIN "limenka.org"
55 #define QAPP_APP_NAME_DEFAULT "Limenka-Qt"
56 #define QAPP_APP_NAME_TESTNET "Limenka-Qt-testnet"
57 #define QAPP_APP_NAME_TESTNET4 "Limenka-Qt-testnet4"
58 #define QAPP_APP_NAME_SIGNET "Limenka-Qt-signet"
59 #define QAPP_APP_NAME_REGTEST "Limenka-Qt-regtest"
60
61 /* One mebibyte (MiB) in bytes */
62 static constexpr uint64_t MiB_BYTES{1024 * 1024};
63
64 /* One gigabyte (GB) in bytes */
65 static constexpr uint64_t GB_BYTES{1000000000};
66
67 // Default prune target displayed in GUI.
68 static constexpr int DEFAULT_PRUNE_TARGET_MiB{1907};
69
70 #endif // LIMENKA_QT_GUICONSTANTS_H
71