Live data from Hacker News

The end of the nice GTK button

blog.brixit.nl

221–230 of 666 posts

Re: The end of the nice GTK button

#221
post #206
post #141

Earlier quoted context omitted.

> All of this stuff can be made to work. We’ve tolerated a great degree of complexity just to make fonts look good at 96 DPI. Looks like we’re able to tolerate a bit more complexity to enable GPU rendering. However, many years into having high DPI displays, it’s not obvious people are willing to take the complexity to make low DPI and high DPI screens look good simultaneously. The thing is, with fonts , we already be…

Can't the font renderer render a straight line? Like sans serif "I”? The font rasterizer already exists (unless it is a bitmap font UI, but those aren't common any more). How does adding additional mechanisms make for a simpler or cleaner rendering pipeline?

The font rasterizer is a massive hack in modern UIs. Subpixel rendering is a serious pain in the ass. When you render text using subpixel rendering, you render the actual vectors at 3x the spatial resolution. But, not simply as if the vectors were 3x wider, because that would look too sharp: it needs to render as if there was 3x as many pixels, which is different.

Then there’s compositing. Normal layers can be composited using alpha blending, assuming some sane format like premultiplied alpha RGBA. But not subpixel rendered text, because alpha blending the components will fuck up the subpixel rendering.

And it goes on, because if you want to handle text like everything else, you need special cases for it to look right. Rotation? Need to render the vectors rotated; can’t rotate in raster. If you need to render to a surface then transform that surface, you’re SOL; it can’t go to rasters until the end.

Normal surfaces can also be rendered at subpixel positions, and of course this does not work for surfaces containing text, because again, it will destroy the subpixel rendering.

OK. So you can get rid of the subpixel rendering and render slightly blurrier glyphs instead. (R.I.P. anyone trying to tell hanzi/kanji apart.) It’s still going to murder legibility if you move it over by a subpixel value because text is already on the edge of readability at 96 DPI.

I haven’t considered gamma correction, hinting, blending different colors, different blending modes, GPU acceleration, etc. because I simply don’t have the brain power to try to reconcile it all. It’s a nightmare.

We already did some of this for text. Which is a herculean effort. We use a freakin virtual machine to power font hinting, and ugly, complex, slow special casing at many layers of already ridiculously complex vector graphics stacks (I mean if you disagree with that assessment, you may just be smarter than I am, but I have serious trouble following the Skia codebase and I doubt Cairo is really that much better.) And speaking of which, there only really seems to be a handful of them out there: there’s Skia, used by most web browsers; Cairo, used by GTK; Direct2D, in Windows; Whatever modern macOS uses that isn’t QuickDraw anymore; and I guess there’s Mozilla’s pathfinder, a promising Rust-based vector graphics engine that was built as part of Servo and seemingly mostly abandoned, much to the world’s detriment. This work is hard. It can be done, but it’s not something I think a single engineer can do, if you want to build one that competes with the big boys even disregarding a few things like performance. I’d love to be wrong, but I have a sinking feeling I’m not.

Even text isn’t done being overcomplicated. As nyanpasu has mentioned above, some software have started implementing SDFs for font scaling. We do this because text legibility is really that important, whereas a line in the UI being slightly blurry for users on older screens is really just not that important. Some languages flat out can’t be read with crappy font rendering, and any of them will give you eyestrain if it’s ugly enough. As much as it sucks, a blurry border on a button doesn’t have an accessibility issue. And rendering at 1x and making the compositor upscale is not a great solution either because again, it’s already hard enough to read text in some languages; the added blurriness of scaling text and ruining subpixels is basically intolerable.

These hacks aren’t free, and with high DPI displays, they’re not needed. There’s a reason Apple did what they did.

Re: The end of the nice GTK button

#222
post #219

Earlier quoted context omitted.

This is why I have reverted to the CLI whenever possible. There's something deeply assuring knowing that I don't have to relearn my whole workflow every few months when the trends change. ls, grep, find, ps, htop will always be what they are. Even the Windows CLI is thankfully consistent. All I want is to get work done the way I want, and I've found the CLI is increasingly the path of least resistance.

> ls, grep, find, ps, htop will always be what they are. SystemD screwed with a few that I'm still discovering one by one. "cron", "shutdown" is no longer in the default debian path, I think ulimit was another one. But at least I don't wake up one morning with the whole interface rearranged.

cron is in /usr/sbin (and is a daemon, not a command you'd ever run manually); shutdown is in /sbin; and ulimit is a shell builtin, not a standalone executable at all.

If I had to guess, I'd say that /sbin and /usr/sbin aren't on your $PATH for some reason. systemd is unlikely to be the culprit.

Re: The end of the nice GTK button

#223
post #100

A lot of comments in this thread are negative. As a developer using GTK4 and libadwaita, and as a user that uses gnome, I really like the changes. GTK4 brings some much needed changes, and the major bugs like listview scrolling being broken or bad text rendering on non-hidpi displays suck, but both have people working on fixing them. Libadwaita is a huge improvement, and makes it way easier to build good apps. As for…

> As for themes, I quite like the new libadwaita theme, and prefer it to the default GTK theme. You're free to disagree, but you can't say your opinion is correct, nor can I. I agree... but the gnome devs are directly telling me my opinion is incorrect, by removing the ability for me to change my apps i use to a theme I like. Oh wait sorry, i guess i should have said gnome's apps.

[deleted]

Re: The end of the nice GTK button

#224

Earlier quoted context omitted.

That's sort of what happened with ElementaryOS, isn't it?

Sort of. It largely was a copy of Apple, unfortunately. However I think it at least pushed the bar of what might be possible with Linux, and they're no longer around [1]. I'm hoping someone can come and give real high quality work to the FOSS community and take on a wider perspective. They had to basically do their own thing instead of pushing GNOME/KDE along, which may have to be unfortunately the case. It would be…

Wut... what, when how???

I love ElementaryOS, it's great, everything just works, I didn't have to tweak a single thing or mess with drivers earlier this year when I installed it on a new laptop that even Mint was having issues with.

Going off to read that link now.

Re: The end of the nice GTK button

#225
post #200
post #89

It seems like KDE and Plasma is the place where look and feel is constantly but incrementally refined; we've been saved from this flat design trend so far and things keep looking pleasant and modern and being usable. We know they care, and have great attention to details because that's documented weekly [1]. I find the Breeze theme really well done and its GTK port, Brise, is also very nice, to the point Gnome looks…

XMonad has also escaped the visual design fads quite well.

Does it have any visual elements at all, isn't it only showing other applications visual content?

Re: The end of the nice GTK button

#226
post #142
post #48

I don't understand why modern toolbar icons are basically abstract shapes represented by lines. It's 2022, we have 32 bit colors, but toolbar icons have less color than back 30 years ago in Windows 3.1.

> I don't understand why modern toolbar icons are basically abstract shapes represented by lines Much, much easier to style based on whatever the surroundings are. Also easier to maintain a good look if you switch to a completely different theme, and for third party icons to mesh with the OS set of icons (only so many ways you can mess up the sillouette of the shape). Oh, and they scale to basically infinite proporti…

>Oh, and they scale to basically infinite proportions without looking weird, which cannot be said for color vector icons.

Check Haiku OS.

Re: The end of the nice GTK button

#227
post #100

A lot of comments in this thread are negative. As a developer using GTK4 and libadwaita, and as a user that uses gnome, I really like the changes. GTK4 brings some much needed changes, and the major bugs like listview scrolling being broken or bad text rendering on non-hidpi displays suck, but both have people working on fixing them. Libadwaita is a huge improvement, and makes it way easier to build good apps. As for…

> As for themes, I quite like the new libadwaita theme, and prefer it to the default GTK theme. You're free to disagree, but you can't say your opinion is correct, nor can I. I agree... but the gnome devs are directly telling me my opinion is incorrect, by removing the ability for me to change my apps i use to a theme I like. Oh wait sorry, i guess i should have said gnome's apps.

This is an unfortunately very common misconception: you can still set GTK_THEME on libadwaita apps, it's only the gsettings configuration that doesn't work (due to implementation constraints, unfortunately).

Re: The end of the nice GTK button

#228
post #126

Is it that hard to make a legacy theme for libhandy/GTK4? Edit: Elsewhere in this thread it is implied that it was deliberately made impossible.

Posted in another comment:

> This is an unfortunately very common misconception: you can still set GTK_THEME on libadwaita apps, it's only the gsettings configuration that doesn't work (due to implementation constraints, unfortunately).

Re: The end of the nice GTK button

#229
post #221
post #206

Earlier quoted context omitted.

Can't the font renderer render a straight line? Like sans serif "I”? The font rasterizer already exists (unless it is a bitmap font UI, but those aren't common any more). How does adding additional mechanisms make for a simpler or cleaner rendering pipeline?

The font rasterizer is a massive hack in modern UIs. Subpixel rendering is a serious pain in the ass. When you render text using subpixel rendering, you render the actual vectors at 3x the spatial resolution. But, not simply as if the vectors were 3x wider, because that would look too sharp: it needs to render as if there was 3x as many pixels, which is different. Then there’s compositing. Normal layers can be compos…

OK, but there's clearly an existence proof, and it ran fine on 32 bit machines with slow processors (or even embedded CPUs in the 80's!) way before all the piled hacks you are describing were invented.

As I understand it, all that's needed is a vector renderer, and you keep everything (even text) in vector format as long as possible. RGBA then becomes a special case, as it must be for any DPI independent rendering pipeline.

Trying to compose rendered vectors using pixel based operations is madness, so... don't?

That means you can't have a bitmap-based compositor. So what? GPU's are great at rendering vectors. Composite those instead of bitmaps.

Or, just don't composite at all. A decade later, Linux desktop compositors are still an ergonomic regression vs. existing display drivers with vsync and double buffering support.

Re: The end of the nice GTK button

#230

I agree 100% with the author, the old GTK button was gorgeous, it will be missed. > I have had to explain to people tons of times that the random word in the UI somewhere in an application is actually a button they can press to invoke an action. This is one of my biggest complaints with the super flat modern designs. Many widgets lost their skeuomorphic depth, which encoded a lot if visual information (the clickabili…

The flatness of some UIs along with the removal of some visual cues has happened that I have tapped on things that aren't actually a button thinking that they might be one. When I make my own apps one day, I am going to ignore design fads and only make intuitive interfaces.

If you really want to go against the grain, may I suggest radial menus, which allow the user to muscle-memory through menu selections:

https://bindpose.com/custom-marking-menu-maya-python/

Post reply on HN