-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] QDirStat Font Size #268
Comments
Default: Using the Desktop Environment's Font SettingsQDirStat is a Qt 5 -based application; it behaves just the same as other applications using the Qt libs. That means that by default, it uses the settings of your desktop environment, if possible. This works at least for the major desktop environments like KDE Plasma, GNOME, Xfce. So in most cases, it should work to simply use your desktop's settings configuration dialog or applet where you can change the font settings. If you don't know where that is, check the desktop's menu; most of those menus and configuration programs have a search box. Type "fonts' there. Xfce4When I do that in my Xfce4, it gives me one search result, Xfce4's "Appearance" applet: In this first tab named "Style" you can select a desktop theme. Those usually come with some initial font settings. In the third tab "Fonts" you can make very detailed selections for the base font (typically a proportional font) and a monospace font that is typically used for constant-width texts such as terminal windows. DPIBe aware that the DPI (Dots Per Inch) setting may also influence how large those fonts might appear; it overrides the monitor's hardware settings with that value. Scale FactorModern desktops also let you configure a scale factor. This is useful if you either have a very high-resolution ("HiDPI") monitor or a small laptop monitor with high resolution, or if you are vision impaired: Here you can select to up-scale everything in a window, from fonts and icons (!) to the general size of user interface elements ("widgets"). Notice that sometimes this is restricted to non-fractional (integer) numbers like 1, 2, 3; sometimes multiples of 0.25 can be used like 1.25, 1.5, 1.75; sometimes all fractional numbers (1.83, 2.47) can be used. Try what works in your environment. Apply to Non-Native ApplicationsIn some cases, a desktop has a setting named something like "apply settings to non-native applications"; that means that KDE Plasma will try to use those font sizes and theme settings to non-KDE applicatoins as well. Similar for GNOME and non-Gtk (non-GNOME) applications. KDE Plasma, GnomeIt's very similar in most other modern desktop environments. The dialogs look different, but the principles are very much the same. |
qt5ctqt5ct is a standalone graphical configuration program for all Qt 5 applications on your machine: Installing qt5ct
Usage
Config File LocationThe values are stored at
Unfortunately the relevant part here is stored as a [Fonts]
fixed=@Variant(\0\0\0@\0\0\0 \0\x44\0\x65\0j\0\x61\0V\0u\0 \0S\0\x61\0n\0s\0 \0M\0o\0n\0o@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\x14\0\x44\0r\0o\0i\0\x64\0 \0S\0\x61\0n\0s@&\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=Adwaita
standard_dialogs=default
style=Fusion But you can simply copy that file to the root user's home directory (with |
Qt Environment VariablesQT_SCALE_FACTORThis is very similar to that "Window Scaling" factor that some desktops have, but it's limited to Qt applications. You can set it generally for all Qt applications, e.g. in your shell startup files (
(It may depend on your exact Qt version if fractional numbers are supported) ...or you can add it to each individual command line:
Tip: Add it to the .desktop FileYou can do that specifically for QDirStat if you edit the command line in the
So the whole .desktop file looks like this: [Desktop Entry]
Type=Application
Name=QDirStat
Exec=sh -c "QT_SCALE_FACTOR=2 qdirstat %f"
Icon=qdirstat
GenericName=QDirStat Directory Statistics
Terminal=false
MimeType=inode/directory;inode/mount-point;
Categories=Qt;System;Filesystem;
Keywords=directory;tree;size;statistic;disk;space; QT_SCALE_FACTOR_ROUNDING_POLICYThis indicates how to treat fractional factors. Values:
See also https://doc.qt.io/qt-5/qt.html#HighDpiScaleFactorRoundingPolicy-enum The default for this may be different between Qt versions. Example
QT_SCREEN_SCALE_FACTORSThis is meant to be used for a multi-screen setup where each screen has a different resolution or physical size, so you need a different scale factor for each one:
Notice the quotes Further ReadingThere are many more environment variables that can be used with Qt, but that can get complicated quickly, and it might depend on the exact Qt 5.x version on your system. For more information, see https://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt. |
This is intended as documentation. If you have a problem in this area, please open a new GitHub issue. |
Received via mail from Justin A. [email protected]:
Moved to this issue tracker to share the answer with other users who have the same question.
The text was updated successfully, but these errors were encountered: