Laidout / laidout

Laidout, desktop publishing software
GNU General Public License v3.0
79 stars 8 forks source link

[HiDPI] Laidout is way too small on my screen, doesn't seem to respect GDK_SCALE or QT_SCREEN_SCALE_FACTORS #16

Open ctrlcctrlv opened 5 years ago

tomlechner commented 5 years ago

I have something in the works for live update of the UI scale, but it's not ready yet. Part of a larger overhaul of window theming. Not sure when that will be ready.

As a workaround, there's two main parts to the scaling. First is font size. This used to be adjustable, but I seem to have broken it at some point. Normally, you would specify theme fontsize in ~/.config/laidout/(version)/laidoutrc.

Then there's icons. You will need to rebuild the icons in a larger size. First go to laidout/src/icons, then run:

./makeimages.py 256 (or whatever is a good pixel size for icons for your monitor)
./makeimages.py -icons-tiling.svg 1024 (this number should be about 4 times the number above)
cd ../../laxkit/lax/icons
./makeimages.py 256
(now copy all the laxkit pngs into the laidout directory)

These new icons can either be built into the install or use them as a custom icon_dir set in the laidoutrc.

Responding to GDK_SCALE or QT_SCREEN_SCALE_FACTOR (or maybe only QT_SCALE_FACTOR) shouldn't be too hard, at least for fonts. I'll add that to my theme todo list.

ctrlcctrlv commented 5 years ago

Thanks. This is unrelated, but is it possible to stroke a path A with another path B, where B does not turn as it transverses path A...like this:

https://i.ytimg.com/vi/Sj64ocyCmRI/maxresdefault.jpg

Some call these "vector brushes"

tomlechner commented 5 years ago

Alas, no. The closest is adjusting the stroke rotation with the weight nodes, but the "brush" is still just a straight line.

ctrlcctrlv commented 5 years ago

Got it, I figured that. Thanks a lot for the help. Here's hoping for vector brushes someday :-)

tomlechner commented 3 years ago

So, took an embarrassing amount of time, but finally made a little progress here.

You can now run Laidout with laidout --uiscale 2, or put a line uiscale 2 in laidoutrc and the default scale of text and various controls in on-canvas interfaces is boosted by the specified number. This currently forces icon scale, which makes them a bit fuzzy, so one would still need to rescale icon files manually for crisper icons at the moment.

I'm working on being able to rescale icon files and set uiscale from a settings window while running Laidout instead of messing with laidoutrc. Hopefully I can make that work in less than 2 years this time!

tomlechner commented 6 months ago

So, missed the 2 year mark, but a little more progress here!

Laidout can now scale UI a few different ways:

  1. Specify manually with laidout --uiscale (any positive number) or set uiscale in the laidoutrc file.
  2. Set environment variable GDK_SCALE (Laidout will recognize any positive real number, not just integers)
  3. Set environment variable QT_SCALE_FACTOR
  4. Press the "?" button for a (really terrible) settings dialog, where you can set the uiscale, but you currently have to restart for it to really take effect. Live UI rescale is almost ready. The settings window is verrrrry much a work in progress, so I currently recommend using the above options instead.

Also, if you drag a window between screens with different dpi scales, ui scale will change according to what X11 reports as pixel density of the monitor. This feature is also work in progress, as my own monitors aren't really different enough to adequately test.

My goals for this issue:

  1. Further testing of all the widgets and interfaces to make sure they all respond to ui scale
  2. Make the live settings dialog actually work
  3. Implement icon rescaling from within Laidout, so UI scale won't always make the icons fuzzy.
  4. Stretch goal is having overrides for individual monitor pixel sizes, analogous to QT_SCREEN_SCALE_FACTORS. I'm reluctant to use QT_SCREEN_SCALE_FACTORS directly because it's not clear how those numbers relate to specific monitors.

A lot of this is pretty new code, so there's probably glitches here and there. I'm aiming for doing more testing before this year's Libre Graphics Meeting in May. Otherwise at my rate of progress, further updates will come sometime within the next 4 years!