Changing the font size of smaller elements

General support for problems installing or using Deluge
Post Reply
chuckingcabbages
New User
New User
Posts: 3
Joined: Fri Jun 16, 2023 4:26 pm

Changing the font size of smaller elements

Post by chuckingcabbages »

With Deluge 2.x, some elements on the sidebar and the bottom bar have a smaller font size than the rest of the program, which is getting on my nerves. I've been digging through the css of gtk-3.0 themes to see where the problem lies, but I can't seem to find the issue. Which css element can I change so that this text has a font size consistent with the rest of the program?

Here is a picture with the smaller elements circled:
https://i.imgur.com/4X5y17v.png
mhertz
Moderator
Moderator
Posts: 2216
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Changing the font size of smaller elements

Post by mhertz »

Deluge v2.x directly specifies in the statusbar python code to use small text as formatting for some of the fields, as you found, in contrary to deluge v1.x. I'm unsure about if can change this from a theme through CSS, but honestly doubt it, as directly hardcoded, and I doubt there's exposed a distinction for each specific statusbar item, for styling through CSS, as opposed to whole statusbar in full, but though very well could be wrong.

I see you're using windows, meaning this cannot just be edited in the python source-code, but need to be (rebuilt/)refreezed with pyinstaller into new deluge.exe, to replace the old one with, but would need done on each update, and alot of bother for such small nuance imho, but see your point of-course.

Sorry no good news to offer.
chuckingcabbages
New User
New User
Posts: 3
Joined: Fri Jun 16, 2023 4:26 pm

Re: Changing the font size of smaller elements

Post by chuckingcabbages »

Out of curiosity, what would it take for me to rebuild Deluge with these fixes?
mhertz
Moderator
Moderator
Posts: 2216
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Changing the font size of smaller elements

Post by mhertz »

I just came back to edit in that I tried adding in font-size etc, as statusbar property in standard adwaita gtk3 theme, which I added externally and defined for usage, and I could control the statusbar text, but as said, only all fields at once, and still the size difference between fields retained, atleast in quick testing.

Code: Select all

statusbar {
font-size: 16pt;
}
Also, there are in the windows installer, included a few gtk-builder ui files, as fails freezing, so maybe one could edit the relevant one i.e. main_window.ui, but I couldn't find a property helpful, but mind you, not good at these things whatsoever. It's at the bottom section btw, under ' <object class="GtkStatusbar" id="statusbar">'. Just adding for completeness, if you or others reading wanted mess more with such.

As per your question, I can not really answer that sorry - follow directions in the source code docs for building + under packaging/win for freezing etc docs, and if need help understanding anything, then i'll gladly give you some pointers.

Anyway, do you want me to do it for you? If so, then will not be quick and little patience needed, as im not in the mood to do it right now to be honest, and neither sure when will be exactly.
chuckingcabbages
New User
New User
Posts: 3
Joined: Fri Jun 16, 2023 4:26 pm

Re: Changing the font size of smaller elements

Post by chuckingcabbages »

If you could do that, it would be much appreciated. Take your time, of course. Would it be possible for you to add this change here as well?
viewtopic.php?f=7&t=56029&p=234013 (Adding two decimal places to the progress bar of individual torrents)

I also took a look at the docs, but the build guide is only for 1.3.15 for Windows, it seems that there is no 2.x build guide, unless I am looking in the wrong place.
mhertz
Moderator
Moderator
Posts: 2216
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Changing the font size of smaller elements

Post by mhertz »

You're welcome :) Yes, I did that too, and all credit just_some_user for that change.

deluge.exe (replace deluge.exe e.g. in '%programfiles%\deluge' - if not using x64 windows, then let me now, and which is assumed here - libtorrent version irrelevant)

If something looks smaller now, then it's just because small letters as oppossed to big letters and numbers, as nothing is hardcoded as small anymore, like deluge 1.x.

Yeah sorry, some docs are outdated as you found. There's little docs in source code, readme.md in main dir and another under packaging/win, but very superficial, but as said if you or anyone need pointers, then i'll gladly help, for some step, not everything at once as too long to explain(or can see my batchfile I made for building it, but still needs various deps local to my setup etc). If building to replace exe of original installer as I did here, then e.g. need hardcode pyopenssl and cryptography to 22.0.0 and 37.0.4 respectively, to match original build and not let deluge.exe bork out, etc.

Anyway, hope helps.

Edit: All big antivirus's test my deluge.exe clean, but if checking on virustotal then a few obscure ones(of the 71 tested) flags it as suspicious or malicious, but that is same for the original deluge.exe when checking that - it's a common issue of using pyinstaller for freezing, and I previously did alot of efforts into trying make exe's test clean on virustotal, e.g. rebuilt and retested using 9 different pyinstaller versions, and myself rebuilding the pyinstaller bootloader(Edit: and again now), as often cited workaround, but to no avail. I only use my windows VM for testing/building deluge windows stuff, to help out, and not for any personal things, and have antivirus enabled(default win10 defender). Just for full disclossure.

Virustotal report of official installer's deluge.exe(sha-256: 5344162AA0A5F6E62B316B92933A455208BF8884554EBF66FBCBC31EEDE9642C): https://www.virustotal.com/gui/file/534 ... 1eede9642c
(from libtorrent v2.x installer version, whereas the libtorrent v1.x version list only one suspecious flagging(vs the 3 here), despite deluge.exe has no relations to libtorrent here, as provided externally to it, so should be same in reality)

Mine(sha-256: 0D81A116351A3990492027A78E5497E890D6F33B837FBCB4E3010B77210801FA): https://www.virustotal.com/gui/file/0d8 ... 77210801fa
(the trojan.agent flagging, means unknown type, despite being wrong/false-positive here - It's only flagged as such by Chinese antivirus 'rising', known for false-positives, just google it).

You can verify sha-256 file-hashes of deluge.exe through e.g. in cmd-prompt running: 'certutil -hashfile deluge.exe sha256'

I added the two fixes and nothing else, and it's detected clean by wast majority of antivirus engines, but own decision to use or not, shouldn't trust people on the internet, not even me.

Edit2: Now my linked deluge.exe tests likewise as official deluge.exe on virustotal, so 3 flaggings but no trojans, and all false possitives of-course. I'm sorry, the reason for the previous differences was because I haden't noticed official deluge used a never rebuilded gvsbuild, which I had forgot check and update to, and making these disreprencies strangely, but was still false-positives before. New virustotal report of my deluge.exe(sha-256: e3613e4fac74e26999b432bcb053b5dbf664e3d13c0be866826abd7ea0893518): https://www.virustotal.com/gui/file/e36 ... 7ea0893518
Post Reply