Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
gui: explicitly disable "Dark Mode" appearance on macOS #14593
Bitcoin Core's gui is pretty broken for a someone using macOS in "Dark Mode"; the biggest issue being lots of white text on a white background, leaving most inputs, the rpc console etc unusable.
This is likely something we'll have to wait for Qt to fix/support, so it's probably easiest to just disable for now, rather than provide a broken UI; see screenshots below. This issue might not have come up much yet, given the issues with the 0.17.0 dmg.
Apple documentation on "Opting out of Dark Mode" is here.
Related upstream tickets:
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
I did some testing with 29f429d and Qt 5.12 (HEAD 82ca14f), and the situation is improved somewhat, but still broken. So I'd still suggest we explicitly disable this for now, and back-port to the 0.17.1 branch, so we don't continue to provide a broken UI (for "Dark Mode" users) there.
cf2f430 gui: explicitly disable "Dark Mode" appearance on macOS (fanquake) Pull request description: Bitcoin Core's gui is pretty broken for a someone using macOS in "Dark Mode"; the biggest issue being lots of white text on a white background, leaving most inputs, the rpc console etc unusable. This is likely something we'll have to wait for Qt to fix/support, so it's probably easiest to just disable for now, rather than provide a broken UI; see screenshots below. This issue might not have come up much yet, given the issues with the 0.17.0 dmg. Apple documentation on "Opting out of Dark Mode" is [here](https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app). > If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the NSRequiresAquaSystemAppearance key (with a value of true) in your app’s Info.plist file. Setting this key to true causes the system to ignore the user's preference and always apply a light appearance to your app. Related upstream tickets: * [Qt Applications are not usable under macOS Mojave with dark theme](https://bugreports.qt.io/browse/QTBUG-68850) * [macOS 10.14 Mojave Support](https://bugreports.qt.io/browse/QTBUG-68891) Screenshots: ![main](https://user-images.githubusercontent.com/863730/47616668-f8769400-dafa-11e8-9ec5-9f184d8210f8.png) ![pay to](https://user-images.githubusercontent.com/863730/47616670-fad8ee00-dafa-11e8-876f-c656de0e31c4.png) ![qr code - not hilighted](https://user-images.githubusercontent.com/863730/47616671-fdd3de80-dafa-11e8-873f-f7fa3e91c2a0.png) ![qr code](https://user-images.githubusercontent.com/863730/47616672-00363880-dafb-11e8-883c-59a084b18120.png) Tree-SHA512: 01f6f6b1fed0f20937b433adef38ff55ccacce8b4405dd6be67356ee9a470a56b8e511cc79909a39c3091a852f444284e49a8773cf6c037a29669804185ca92d
f9db08e qa: Avoid race in p2p_invalid_block by waiting for the block request (MarcoFalke) 7935881 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift) 9666dba rpc: Make HTTP RPC debug logging more informative (practicalswift) b901578 add test demonstrating addrLocal UB (Kaz Wesley) 6f04264 fix uninitialized read when stringifying an addrLocal (Kaz Wesley) 5782fdc Throw error if CPubKey is invalid during PSBT keypath serialization (Gregory Sanders) de5e48a Bugfix: RPC: Add address_type named param for createmultisig (Luke Dashjr) df5131b gui: explicitly disable "Dark Mode" appearance on macOS (fanquake) Pull request description: Backports #14593, #14596, #14618, #14690 and #14728 to the 0.17 branch. Tree-SHA512: fcda4b75fcb71bb80cc8bde2a2b98ff5c0239dfa754ac980b1a91a90409502ac7678326399a4fc03a773074339dbf8b3d11750c91fe4302741a954745acfcca1
* Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet things Instead of dropping the unnecessary UTXO based on whether the wallet did something, do it based on whether two UTXOs are there. * Convert non-witness UTXOs to witness if witness sig created If a witness signature was created when a non-witness UTXO is used, convert the non-witness UTXO to a witness one. * doc: Clean out release notes after release 0.17.0 Tree-SHA512: 0b641fdf4cf4ac6a6f9f5c1b45d65c4449b0d7bb777ba57498e389840ba7a37bfc0569ce5e70f0ac998785fc4eea600ecf6f7c7d83d86513997f4033bcc14a5d * [wallet] Restore ability to list incoming transactions by label Backport of PR 14411 to v0.17. This change partially reverts bitcoin#13075 and bitcoin#14023. Fixes bitcoin#14382 * [doc] getblocktemplate: use SegWit in example * qa: Add TestNode::assert_debug_log Github-Pull: bitcoin#14024 Rebased-From: fa3e9f7 * [qa] Use correct python index slices in example test Github-Pull: bitcoin#14215 Rebased-From: 9dcb676 * qa: Add some actual witness in rpc_rawtransaction Github-Pull: bitcoin#14052 Rebased-From: fae0400 * scripted-diff: Pass node into p2p_segwit acceptance tests -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/(test_witness_block|test_transaction_acceptance)\((self\.nodes\[.\])\.rpc/\1(\2/g' test/functional/p2p_segwit.py -END VERIFY SCRIPT- Github-Pull: bitcoin#14101 Rebased-From: 749ba35 * scripted-diff: Use named arguments in feature_block -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e "s/sync_blocks\((.*?), (True|False), (1.?), /sync_blocks(\1, success=\2, reject_code=\3, reject_reason=/g" ./test/functional/feature_block.py -END VERIFY SCRIPT- Github-Pull: bitcoin#14101 Rebased-From: b4d3309 * qa: Use named args in some tests Github-Pull: bitcoin#14101 Rebased-From: fa782a3 * test: Add tests for RPC help Github-Pull: bitcoin#14020 Rebased-From: 6af6d9b * Test rpc_help.py failed: Check whether ZMQ is enabled or not. Github-Pull: bitcoin#14122 Rebased-From: 8dfc2f3 * qa: Premine to deterministic address with -disablewallet Github-Pull: bitcoin#14180 Rebased-From: faa669c * qa: Run all tests even if wallet is not compiled Github-Pull: bitcoin#14180 Rebased-From: fac9539 * Import CInv from correct module Github-Pull: bitcoin#13965 Rebased-From: a9cf5c9 * doc/descriptors.md tweaks Add some implementation details, and tweak phrasing in examples section to be more explicit about how script expressions are used for matching. Github-Pull: bitcoin#14161 Rebased-From: eb49412 * descriptors.md: Refer to descriptors as describing instead of matching Github-Pull: bitcoin#14161 Rebased-From: eeeaa29 * Disable wallet and address book Qt tests on macOS minimal platform macOS Qt minimal platform is frequently broken, and these are currently failing with Qt 5.11.1. The tests do pass when run on the full cocoa platform (with `test_bitcoin-qt -platform cocoa`). Github-Pull: bitcoin#14011 Rebased-From: a3197c5 * [macOS] Remove DS_Store WindowBounds bytes object Github-Pull: bitcoin#14416 Rebased-From: 43719e0 Tree-SHA512: 0b5987abf34a8c62c3f704c4ca3c9837a23fbce11954740461833099157db94418886001993f9f1a0b3252c923bd049bc1e1d0f99d04205c889270755a8cd245 * doc: Update release notes for 0.17.0.1 * build: Bump version for 0.17.0.1 * travis: Pin flake8 version to 3.5.0 * Docs/Release notes: 0.17.0.1 is a minor release * qt: Revert "Force TLS1.0+ for SSL connections" This reverts commit 15e26a6, whose purpose was to tweak the Qt configuration to force TLS, i.e., to disable SSLv3, in Qt versions >= 5.5. However, the default behavior of Qt >= 5.4 is to disable SSLv3 anyway , so the configuration tweak is redundant. With Qt 5.11.2, the configuration tweak is not only redundant but in fact provokes a deadlock (bitcoin#14359) due to Qt 5.11.2 being incompatible with OpenSSL 1.1.1 . Since the deadlock occurs at the early startup stage of bitcoin-qt, it renders bitcoin-qt entirely non-functional when compiled against OpenSSL 1.1.1 and Qt 5.11.2 (and possible future combinations of OpenSSL and Qt versions). This commit fixes bitcoin#14359 by removing the redundant code.  https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3fd2d9eff8c1f948306ee5fbfe364ccded1c4b84  https://bugreports.qt.io/browse/QTBUG-70956 Github-Pull: bitcoin#14403 Rebased-From: 7d173c4 Tree-SHA512: 71a34b13202c834c5ca73bcb9b70efff26c34e1aac3b954f098620b62c2be53a8e319929c4764a5b5cc5d0dd163ff70f4eb3a4f1f608363b7d23d1b16b25ddc7 * doc: Clean out release notes after 0.17.0.1 Tree-SHA512: c04192e3b93537f4b37f5ea55fd455b26dd7d902da3b5f8b59ef6fa4590cf413b72fc11bba330a8fd7fa3938b09e6c1d35171806ab5ce85d6b99681953c291a5 * wallet: Avoid potential use of unitialized value bnb_used in CWallet::CreateTransaction(...) Github-Pull: bitcoin#13546 Rebased-From: a23a7f6 * Add autogen.sh in ARM Cross-compilation autogen for the config files was missing. Github-Pull: bitcoin#14276 Rebased-From: 52beb9e * [wallet] Ensure wallet is unlocked before signing Github-Pull: bitcoin#14310 Rebased-From: db15805 * Fix listreceivedbyaddress not taking address as a string Fixes bitcoin#14173. Add the patch in bitcoin#14173 and include a regression test. Github-Pull: bitcoin#14417 Rebased-From: d4d70ed * qa: Add test to ensure node can generate all help texts at runtime Github-Pull: bitcoin#14658 Rebased-From: bbbbb3f * Tests: Fix a comment Github-Pull: bitcoin#14632 Rebased-From: 086fc83 * build: Remove illegal spacing in darwin.mk Github-Pull: bitcoin#14647 Rebased-From: 63c74d2 * add a test demonstrating an overflow in a deserialization edge case Also add a test that the highest legal index is accepted. Github-Pull: bitcoin#14685 Rebased-From: 051faf7 * fix a deserialization overflow edge case A specially-constructed BlockTransactionsRequest can overflow in deserialization in a way that is currently harmless. Github-Pull: bitcoin#14685 Rebased-From: 6bed4b3 * build: Add bitcoin-tx.exe into Windows installer Github-Pull: bitcoin#14698 Rebased-From: 5c5902a * disallow oversized CBlockHeaderAndShortTxIDs Otherwise we'd reply with a bogus BlockTransactionsRequest trying to request indexes with overflowed deltas. Github-Pull: bitcoin#14685 Rebased-From: b08af10 * travis: Remove deprecated sudo * gui: explicitly disable "Dark Mode" appearance on macOS Github-Pull: bitcoin#14593 Rebased-From: cf2f430 * Bugfix: RPC: Add address_type named param for createmultisig Github-Pull: bitcoin#14596 Rebased-From: d8bf107 * Throw error if CPubKey is invalid during PSBT keypath serialization Github-Pull: bitcoin#14690 Rebased-From: 4e4de10 * fix uninitialized read when stringifying an addrLocal Reachable from either place where SetIP is used when our best-guess addrLocal for a peer is IPv4, but the peer tells us it's reaching us at an IPv6 address. In that case, SetIP turns an IPv4 address into an IPv6 address without setting the scopeId, which is subsequently read in GetSockAddr during CNetAddr::ToStringIP and passed to getnameinfo. Fix by ensuring every constructor initializes the scopeId field with something. Github-Pull: bitcoin#14728 Rebased-From: b7b36de * add test demonstrating addrLocal UB Github-Pull: bitcoin#14728 Rebased-From: 8ebbef0 * rpc: Make HTTP RPC debug logging more informative Github-Pull: bitcoin#14618 Rebased-From: 9912486 * Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) Github-Pull: bitcoin#14618 Rebased-From: ab8c6f2 * qa: Avoid race in p2p_invalid_block by waiting for the block request Github-Pull: bitcoin#14700 Rebased-From: fa21568 * Remove stale comment in CalculateMaximumSignedInputSize * CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown change * [tests] Add wallet_balance.py Adds a test specifically to test the wallet's getbalance and getunconfirmedbalance RPCs. Github-Pull: bitcoin#14845 Rebased-From: c1825b9 * check that a separator is found for psbt inputs, outputs, and global map Github-Pull: bitcoin#14377 Rebased-From: 4fb3388 * More concise conversion of CDataStream to string Use .str() instead of .data() and .size() when converting CDataStream to a string. Uses std::string, avoiding conversion to a C string. Github-Pull: bitcoin#14588 Rebased-From: fe5d22b * Remove redundant txConst parameter to FillPSBT Github-Pull: bitcoin#14588 Rebased-From: 4f3f5cb * New PartiallySignedTransaction constructor from CTransction New constructor that creates a PartiallySignedTransaction from a CTransaction, automatically sizing the inputs and outputs vectors for convenience. Github-Pull: bitcoin#14588 Rebased-From: 65166d4 * Add bool PSBTInputSigned Refactor out a "PSBTInputSigned" function to check if a PSBT is signed, for use in subsequent commits. Also improve a related comment. GitHub-Pull: bitcoin#14588 Rebased-From: 53e6fff * Simplify arguments to SignPSBTInput Remove redundant arguments to SignPSBTInput -- since it needs several bits of the PartiallySignedTransaction, pass in a reference instead of doing it piecemeal. This saves us having to pass in both a PSBTInput and its index, as well as having to pass in the CTransaction. Also avoid redundantly passing the sighash_type, which is contained in the PSBTInput already. Github-Pull: bitcoin#14588 Rebased-From: 0f5bda2 * Refactor PSBTInput signing to enforce invariant Refactor the process of PSBTInput signing to enforce the invariant that a PSBTInput always has _either_ a witness_utxo or a non_witness_utxo, never both. This simplifies the logic of SignPSBTInput slightly, since it no longer has to deal with the "both" case. When calling it, we now give it, in order of preference: (1) whichever of the utxo fields was already present in the PSBT we received, or (2) if neither, the non_witness_utxo field, which is just a copy of the input transaction, which we get from the wallet. SignPSBTInput no longer has to remove one of the two fields; instead, it will check if we have a witness signature, and if so, it will replace the non_witness_utxo with the witness_utxo (which is smaller, as it is just a copy of the output being spent.) Add PSBTInput::IsSane checks in two more places, which checks for both utxo fields being present; we will now give an RPC error early on if we are supplied such a malformed PSBT to fill in. Also add a check to FillPSBT, to avoid touching any input that is already signed. (This is now redundant, since we should no longer potentially harm an already-signed input, but it's harmless.) fixes bitcoin#14473 Github-Pull: bitcoin#14588 * Add regression test for PSBT signing bug bitcoin#14473 Github-Pull: bitcoin#14588 Rebased-From: e13fea9 * Add test for conversion from non-witness to witness UTXO Github-Pull: bitcoin#14197 Rebased-From: 862d159 * fix converttopsbt permitsigdata arg, add basic test Github-Pull: bitcoin#14356 Rebased-From: 88a79cb * rpc: Fix wallet unload during walletpassphrase timeout Github-Pull: bitcoin#14453 Rebased-From: 321decf * build: bump version to 0.17.1 Also update man pages. Tree-SHA512: 826f3c9ad1e49902ee2f1710a4329388c0a9298a359971f21130bf8f390d4a7b744d010f04eb109666ceb28d0053b9fa7ec088caaa4e4cc38509526457086d40 * qa: Ensure wallet unload during walletpassphrase timeout 0.17 branch doesn't include bitcoin#12493 which changed encryptwallet behavior. For that reason the test is adjusted. Github-Pull: bitcoin#14453 Rebased-From: 8907df9 * Stop requiring imported pubkey to sign non-PKH schemes Github-Pull: bitcoin#14424 Rebased-From: 2f6b466 * doc: Fill in authors and changelog for 0.17.1 release notes Tree-SHA512: dc23ae43e81ad379b48bb8dc6da21cde647a7edc778563b8b8266dfe84d9baa70bf4565915e276ea0e14aa96ce677547494da0aadeebfcc961f53430c7bb84ea * rpc: Avoid creating non-standard raw transactions Github-Pull: bitcoin#14890 Rebased-From: fa4c867 * importmulti: Don't add internal addresses to address book Github-Pull: bitcoin#14679 Rebased-From: 7afddfa * doc: Clean out release notes post-0.17.1 Tree-SHA512: 0cd6e97156da2dea9a9b557083d8140c17f85f6e718d5fcb73aa67460480b6437b665fad147bf4eacd13570aeb25a29f28c35b7fb0365ae630b2edf05901a431 * Add PSBT documentation Github-Pull: bitcoin#13941 Rebased-From: 19efc01 * doc: Fix PSBT howto and example parameters * Remove outdated reference to replaceable parameter * Fix address reference * Unify quotation and italicization of parameters * Fix PSBT reference Github-Pull: bitcoin#14319 Rebased-From: 78542a3 * Fix minor grammar error in doc Github-Pull: bitcoin#15012 Rebased-From: 72b63bc * fix testmempoolaccept CLI syntax `testmempoolaccept "hexstring"` will give a "JSON parse error". The correct syntax is `testmempoolaccept \[\"hexstring\"\]` (but seems escaping is not displayed in other areas so leaving backspaces out). Github-Pull: bitcoin#14966 Rebased-From: b74a521 * doc: update NetBSD build instructions for 8.0 Github-Pull: bitcoin#14944 Rebased-From: be5ca82 * gui: Favor macOS show / hide action in dock menu Github-Pull: bitcoin#14133 Rebased-From: ee3a494 * Clean systray icon menu for -disablewallet mode Ref bitcoin#3392 Github-Pull: bitcoin#14383 Rebased-From: 36323e2 * Remove obj_c for macOS Dock icon setting Qt `setWindowIcon()` does this work. Github-Pull: bitcoin#14597 Rebased-From: 53bb6be * Use Qt signal for macOS Dock icon click event This moves the Dock icon click reaction code to the common place and allows some cleanup in obj_c code. According to the Apple's docs `class_replaceMethod` behaves as `class_addMethod`, if the method identified by name does not yet exist; or as `method_setImplementation`, if it does exist. Github-Pull: bitcoin#14597 Rebased-From: 2464925 * Remove obj_c for macOS Dock icon menu Qt `setAsDockMenu()` does this work. Github-Pull: bitcoin#14597 Rebased-From: 6b1d297 * qt: Add GUIUtil::bringToFront Github-Pull: bitcoin#14123 Rebased-From: 5796671 * qt: Use GUIUtil::bringToFront where possible Github-Pull: bitcoin#14123 Rebased-From: 6fc21ac * qt: All tray menu actions call showNormalIfMinimized Github-Pull: bitcoin#14123 Rebased-From: 0a656f8 * gui: Fix for Incorrect application name when passing -regtest Github-Pull: bitcoin#15085 Rebased-From: cc341ad * rpc: Make unloadwallet wait for complete wallet unload Github-Pull: bitcoin#14941 Rebased-From: c37851d * Remove errant past from walletcreatefundedpsbt for nLocktime replaceability Github-Pull: bitcoin#15213 Rebased-From: 85f0ca9 * Update zmq to 4.3.1 Addresses https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6250 Github-Pull: bitcoin#15188 Rebased-From: 3046e5f * [0.17] [Doc] Backport release note about PSBT doc * Add function to close all Db's and reload the databae environment Adds a ReloadDbEnv function to BerkeleyEnvironment in order to close all Db instances, closes the environment, resets it, and then reopens the BerkeleyEnvironment. Also adds a ReloadDbEnv function to BerkeleyDatabase that calls BerkeleyEnvironment's ReloadDbEnv. Github-Pull: bitcoin#12493 Rebased-From: 5d296ac * After encrypting the wallet, reload the database environment Calls ReloadDbEnv after encrypting the wallet so that the database environment is flushed, closed, and reopened to prevent unencrypted keys from being saved on disk. Github-Pull: bitcoin#12493 Rebased-From: d7637c5 * Move BerkeleyEnvironment deletion from internal method to callsite Instead of having the object destroy itself, having the caller destroy it. Github-Pull: bitcoin#12493 Rebased-From: a769461 * No longer shutdown after encrypting the wallet Since the database environment is flushed, closed, and reopened during EncryptWallet, there is no need to shut down the software anymore. Github-Pull: bitcoin#12493 Rebased-From: c1dde3a * wallet: Fix duplicate fileid Github-Pull: bitcoin#14320 Rebased-From: 2d796fa * wallet: Add WalletLocation utility class Github-Pull: bitcoin#14350 Rebased-From: 01a4c09 * wallet: Refactor to use WalletLocation Github-Pull: bitcoin#14350 Rebased-From: 65f3672 * wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory. Github-Pull: bitcoin#14552 Rebased-From: 15c93f0 * tests: add test case for loading copied wallet twice Github-Pull: bitcoin#14320 Rebased-From: 4ea7732 * Refactor: Move m_db pointers into BerkeleyDatabase This is a refactoring change that doesn't affect behavior. The motivation behind the change is give BerkeleyEnvironment objects access to BerkeleyDatabase objects so it will be possible to simplify the duplicate wallet check and more reliably avoid opening the same databases twice. Github-Pull: bitcoin#14552 Rebased-From: c456fbd * wallet: Create IsDatabaseLoaded function Github-Pull: bitcoin#14552 Rebased-From: 5912031 * Free BerkeleyEnvironment instances when not in use Instead of adding BerkeleyEnvironment objects permanently to the g_dbenvs map, use reference counted shared pointers and remove map entries when the last BerkeleyEnvironment reference goes out of scope. This change was requested by Matt Corallo <firstname.lastname@example.org> and makes code that sets up mock databases cleaner. The mock database environment will now go out of scope and be reset on destruction so there is no need to call BerkeleyEnvironment::Reset() during wallet construction to clear out prior state. This change does affect bitcoin behavior slightly. On startup, instead of same wallet environments staying open throughout VerifyWallets() and OpenWallets() calls, VerifyWallets() will open and close an environment once for each wallet, and OpenWallets() will create its own environment(s) later. Github-Pull: bitcoin#11911 Rebased-From: f1f4bb7 * wallet: Close dbenv error file db.log The error file db.log is opened by BerkeleyEnvironment instance and should be closed after dbenv is closed. Github-Pull: bitcoin#15297 Rebased-From: 8602a1e * wallet: Close wallet env lock file Close .walletlock file when a BerkeleyEnvironment is deleted. Github-Pull: bitcoin#15297 Rebased-From: 2f8b8f4 * qa: Test .walletlock file is closed Github-Pull: bitcoin#15297 Rebased-From: d3bf3b9 * Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment Github-Pull: bitcoin#11911 Rebased-From: 14bc2a1 * Tests: add unit tests for GetWalletEnv Github-Pull: bitcoin#11911 Rebased-From: 88b1d95 * build with -fstack-reuse=none Github-Pull: bitcoin#15983 Rebased-From: faf38bc * Add test for GCC bug 90348 Github-Pull: bitcoin#15985 Rebased-From: 58e291c * build: bump version to 0.17.2 * doc: update manpages for 0.17.2 * qt: 0.17.2 translation update * doc: update release notes for 0.17.2