Bitcoin Forum

Bitcoin => Electrum => Topic started by: dkbit98 on November 07, 2020, 11:39:29 AM



Title: Electrum custom GUI ?
Post by: dkbit98 on November 07, 2020, 11:39:29 AM
I like using Electrum wallet but I think that GUI interface could be a bit better.

Is there some custom made GUI for Electrum and how hard is to make one from scratch?

I could not find any information on their website, or on reddit and doing internet search.


Title: Re: Electrum custom GUI ?
Post by: ABCbits on November 07, 2020, 11:58:03 AM
Is there some custom made GUI for Electrum

No idea

how hard is to make one from scratch?

Depending on how familiar you are with Python and Qt (which used to create GUI for Electrum) or other GUI library you use.


Title: Re: Electrum custom GUI ?
Post by: jackg on November 07, 2020, 12:04:15 PM
Yeah it looks like they're using another library to do the graphics: https://github.com/spesmilo/electrum/tree/master/electrum/gui/qt

That being said it realistically wouldn't be too hard just to make a custom module and call stuff from thst but you'd also need a nice looking gui style available (and I'm not sure python has one)...


Title: Re: Electrum custom GUI ?
Post by: OmegaStarScream on November 07, 2020, 12:15:37 PM
Depending on how familiar you are with Python and Qt (which used to create GUI for Electrum) or other GUI library you use.

Don't they use Kivy as well? Or is that just for the phone app? Maybe @dkbit98 could look into the following material design libraries (if seeking for a complete remake):

PyQt: https://pypi.org/project/pyqt5-material/
Kivy: https://github.com/kivymd/KivyMD


Title: Re: Electrum custom GUI ?
Post by: dkbit98 on November 07, 2020, 12:42:16 PM
Thank you for quick replies guys.

At the moment I don't have the right skills to make my own GUI, and I was more hoping to find alternative skins that other people made.


Title: Re: Electrum custom GUI ?
Post by: NotATether on November 07, 2020, 03:35:31 PM
There's no third-party Electrum theme (at least for desktop) because Qt is responsible for creating the window, changing the colors of the widgets, placing the widgets around, changing the icons, and so forth. Qt doesn't have built-in theming support because the end-user creates the layout of the window, so there's no way for Qt to know the layout so the colors and icons in it can be changed (I have made a few apps in Qt5).

Electrum could implement theming support itself but it doesn't expose an API for you to make a plugin that represents a theme. All of the colors and icons are hardcoded so short of Electrum developers themselves making a bunch of Qt variables that can be rendered together to make a new theme, there's no way to make a custom theme.


Title: Re: Electrum custom GUI ?
Post by: HCP on November 08, 2020, 12:10:17 AM
I doubt that "reskinning" Electrum is feasible given that all the GUI objects are pretty much embedded in the source code... it's not like a simple .xml layout/config file or something that you can modify to rearrange things...

A while back I was experimenting with adding a custom menu option for a "privacy" option in Electrum (stop your balance leaking into the Windows control panel/system tray etc) (https://bitcointalk.org/index.php?topic=5221880.msg53767706#msg53767706)... anyway, adding in that menu option involved creating a whole bunch of code to add and deal with the checkbox and menu option.


Title: Re: Electrum custom GUI ?
Post by: pooya87 on November 09, 2020, 07:28:21 AM
i don't have that much python knowledge but i have always seen the UI part being tightly coupled with the business logic which makes "decoupling" them extremely hard. if new UIs whether in form of extensions or skins were to be added, the code has to be first refactored which takes a lot of time so i don't think it would happen ever.
some basic features like changing the color of the UI could be added though.


Title: Re: Electrum custom GUI ?
Post by: nc50lc on November 09, 2020, 02:11:58 PM
If just the icons, then it's doable with no coding knowledge (but minor editing skills and/or tools are required).
All you have to do is to edit/replace some icons here: https://github.com/spesmilo/electrum/tree/master/electrum/gui/icons (https://github.com/spesmilo/electrum/tree/master/electrum/gui/icons)
Example:
https://i.imgur.com/J4bc9QE.png

The icons' names should be the same and it should be in "8-bit png" "sRGB web format" in order not to get error messages.
(could be different but it works without errors at my end)
Then run Electrum from source or compile it.

Check-out my (ugly) DarkMode&Red Electrum - running from source (Dark Mode - on):
https://i.imgur.com/ytRCQwc.png (https://i.imgur.com/ytRCQwc.png)
I want the connection icon red so, I've allocated a small green circle for the actual connection status.


Title: Re: Electrum custom GUI ?
Post by: NotATether on November 10, 2020, 06:55:38 PM
If just the icons, then it's doable with no coding knowledge (but minor editing skills and/or tools are required).

For editing the icons it is sufficient to just replace the icon files themselves with the ones you want to use since PyQt5 opens the files at runtime, so you could also simply download the portable python bundle of Electrum and run it normally after replacing the icons, no compilation required.

If it were a C++ Qt5 program the paths to the icons would be in XML files that need to be compiled to binary, and the program itself also needs to be compiled in that case.


Title: Re: Electrum custom GUI ?
Post by: libertariandude on December 23, 2020, 07:20:40 AM
Electrum Desktop uses Qt and mobile uses Kivy.

I believe importing custom themes on Desktop would require a lot of refactoring of the source code in order to allow that.

I have some coding experience and am interested in learning Kivy to update the UI to KivyMD.
Not sure how hard it will be, but I believe it wont be that hard.

Does anyone know if there's someone already working on it?


Title: Re: Electrum custom GUI ?
Post by: NotATether on December 24, 2020, 08:00:03 AM
Electrum Desktop uses Qt and mobile uses Kivy.

I believe importing custom themes on Desktop would require a lot of refactoring of the source code in order to allow that.

I have some coding experience and am interested in learning Kivy to update the UI to KivyMD.
Not sure how hard it will be, but I believe it wont be that hard.

Does anyone know if there's someone already working on it?

"Electrum KivyMD" doesn't return any hits on Google Search except for this thread so you can take that as a no.
Fortunately, all of Electrum's Qt and Kivy stuff are self-contained in a single folder, so you only have a few files to change.