59035060e9b2b911809fdc225bfa862244f5f6d6 gui: refactor amount formatting (Aaron Carlucci) c6b8133286a4009cc1e72935e30af36d43705237 gui: add space separator to amount integer (Aaron Carlucci) Pull request description: This PR is based on #1182 and aims to actually refactor the amount component while adding a space separator to the integer portion of BTC amount displays as per #962. The code organization is reworked to try and separate the conversion of `bitcoin::Amount` type to a `iced` renderable `Row` elements in steps via smaller functions by: 1. Converting the `Amount` type to a string with the integer and fraction portions formatted in space-separated three digit chunks. 2. Detecting where in that string the non-zero BTC amount occurs 3. Converting the string into parts and rendering the preceding zeros and spaces with normal styling while applying a bold `Row` render element for the significant amount. To me, this approach makes the code easier to read and is a small step toward separating the string formatting functionality from the render element building. If we find more bugs with this approach, or the team simply doesn't like the reorganization, it's fine to scrap it, as it was a decent learning exercise anyway. Looking forward to feedback. ACKs for top commit: edouardparis: ACK 59035060e9b2b911809fdc225bfa862244f5f6d6 Tree-SHA512: d71b94cf261cf799891239da3795dae49d2b22ebc888b2d3400fbf754f84df6620fcdeb6b6594ef99e4de8a67089181ac8598bdc7a4aba3e71c16d89ccb63fae
Liana GUI
The Liana graphical interface.
Dependencies
You will need a few dependencies in order to run correctly this software. For Linux systems, those are:
fontconfigfor access to fonts (On Debian/Ubuntuapt install libfontconfig1-dev)libudev-devto communicate with devices through USB (On Debian/Ubuntuapt install libudev-dev)
In addition, if you want to build the project from source, you will need:
pkg-config(On Debian/Ubuntuapt install pkg-config)
Usage
For a quick guide to try out the software see ../doc/TRY.md.
liana-gui --datadir <datadir> --<network>
The default datadir is the same as for lianad (~/.liana for Linux). The default network is
Bitcoin mainnet, but testnet signet and regtest are supported.
If the software is started with no parameter and no data directory is detected, a Liana installer will be spawned that will guide you in the processing of configuring Liana.
If the software is started and a reachable lianad is running, it will plug to it via lianad's
JSONRPC interface.
The environment variable LOG_LEVEL with values error, warn, info, debug, trace, overrides the log settings from the config file.
Troubleshooting
- If you encounter layout issue on
X11, try to start the GUI withWINIT_X11_SCALE_FACTORmanually set to 1