/tech/ - Technology

Technology & Computing


New Reply
Name
×
Sage
Subject
Message
Files Max 5 files32MB total
Tegaki
Password
[New Reply]


Putin's given us the boot! Read about it here: https://zzzchan.xyz/news.html#66208b6a8fca3aefee4bf211


mumble.png
[Hide] (62.9KB, 2556x1401)
170-zoom.png
[Hide] (898.4KB, 2556x1383)
>have imperfect vision
>sit about 1 meter (3 feet) from the computer monitor
>be in video gaming clan
>they use mumble
>pic related is mumble
>can't just scale up fonts and elements by ctrl + scroll up like i can with my terminal emulator or web browser
>have to lean in every time I need to do something with the program

Is this why javascript and web apps are subsuming desktop application development? It is trivial to define a general page layout and theme and let the user zoom in as needed. Is it not the same for GUI frameworks?

second pic is comfortable reading siz except for the URL and title bar.
Replies: >>7613 >>7615
63865d9178ea81e75227260e1d74b05f649a0f57cc40b4636a5e5bb42faa6bd8.jpg
[Hide] (86.2KB, 920x1024)
>>7612 (OP) 
get glasses, nerd.
not everything will be perfect
Replies: >>7614
>>7613
I shouldn't be wearing glasses.
>>7612 (OP) 
Windows has a built-in UI scaling feature that affects both system and external applications (provided they are scaling-aware which most modern ones are), why not try that?
Replies: >>7624 >>7794
You don't seem too visually impaired. Or maybe I'm more visually impaired than I think.
Replies: >>7624
>>7623 
Well, thanks I guess. I see clear edges, but my eye muscles do weird things which makes small GUI elements harder to see on a consistent basis. I can still read the tiny text on the title bar or the bottom status bars sometimes without leaning in, but they are fixed, non-interactive elements that I don't have to worry about misclicking.

>>7615 
I haven't kept up with versions of Windows. I don't think I will switch back, but it's nice to hear progress for software applications and not just web apps gaining more share of the market.
Replies: >>7629
font-config, various hidpi setting or just xrandr dpi for quick hacks. See arch/gentoo wiki.
>>7624
>I don't think I will switch back
Oh you're on Linux... Tough luck then, although some DEs support UI scaling: https://wiki.archlinux.org/title/HiDPI
Otherwise you can resort to more "old school" solutions:
- Download a screen magnifier
- Decrease your screen resolution
Replies: >>7794
Does nobody write GUI programs on this board? What are your experiences?
>>7758
Sort of. Native applications are not popular these days, it is usually javascript this, react that, or some apps. I have only worked on program developed by someone else and my experience came mostly from the existing code. It sucks when the previous code monkeys didn't know what they were doing. When business logic got implement on a button. There are quirks and undesirables in the framework I am using and I hate it to the gut.
On another hand, there is no framework without the bads. gtk is pozz, qt forces the kitchen sink on you and tk is writing the gui in another lang.
1/2
Replies: >>7760 >>7794
>>7759
I researched web assembly as a replacement for javascript and html. It partly works with immediate mode gui libraries such as imgui and nuklear, with not as good performance. There is qt web assembly, but it's qt. Manipulating dom can be done with js interops but it is slow and no different from js + html. Access to web apis is also limited to js interops and transmitting lots of data between the languages is tricky. The best solution for now is spa and pwa with immediate mode gui on web assembly.
2/2
Replies: >>7768 >>7794
>>7758
I wrote a small program with a very simple (handmade) GUI using SDL, it wasn't very difficult but then again it only needed to display a paragraph of text and like two buttons... The worst part by far was the text rendering; using a bitmap font simplified things for sure but handling text wrapping / bounding was a pain.
Replies: >>7794
>>7760
I have looked into crazier stuff such as porting X11 to emscripten, or forking off xserver xsdl. Then I found emscripten has a tiny bit of xlib implemented. Made me think porting X11 to emscripten may not be that bad if I can twist a fb to treat html canvas pixel buffer as the sink. It is still going to suck to run a display server on a browser to run on a display server.
Replies: >>7777
>>7758
Tk (using Python + Tkinter) is easy and great for simple GUIs.
>>7768
Cursed.
Replies: >>7799
You want this:
https://wiki.debian.org/accessibility#Graphical_User_Interface
Fullscreen zoom, picture-in-picture loupe zoom, cursor enlargement, alternate color schemes, etc.

>>7615
>UI scaling
>>7629
>HiDPI
Those are intended for people with normal vision but tiny hi-rez monitors, though they can be helpful for bad vision too.

>>7759
>qt forces the kitchen sink on you
>tk is writing the gui in another lang
>>7760
>There is qt web assembly, but it's qt
LOL how can any of those be considered bad if you're already willing to put up with the bullshit of keeping up with HTML+CSS+JS+bazillion JS maymay frameworks+an entire extra copy of Chromium bundled exclusively with every running instance of every copy of your app+bindings to whatever language hopefully compiled to native code without GC your actual logic is written in?
>>7763
>I wrote a small program with a very simple (handmade) GUI using SDL
I utterly despise these "I'm too much of a speshul snowflake to comply with your WM's native look & feel or use any of its widgets" fake WIMP GUIs

Just pick a REAL TOOLKIT, there's dozens of them and they all work natively on every desktop OS:
https://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C_(including_bindings_to_other_languages)
Then if you REALLY WANT TO and your toolkit doesn't already do it for you (which many of them do), make Android, iOS, & web ports using other toolkits.

There, you're done, and your app isn't cancerous non-native fucking bullshit.
Replies: >>7796 >>7799
>>7794
>already willing to put up with the bullshit
I am not working with any of those. The lack of native gui programs was gathered from the job market. I hate and have never used electron.
>just make ports with other toolkit
It is a big investment to maintain even one port, multiple ports with platform specific bugs is a nightmare.
>>7777 ✓
Nice digits.

>>7794
>Just pick a REAL TOOLKIT
Easier said than done. I wrote my ad hoc GUI in SDL because it was the easiest option, not just for me as the developer but also for the user who may have to compile my program. The list you linked doesn't have anything that fits my needs...
<GTK
Too bloated and very difficult to compile due to dependency soup. Plus it keeps breaking the API so your program dies the day you stop updating it.
<IUP
Depends on GTK, or alternatively Motif if anyone is still using that.
<Tk
While there are ways to use Tk from C, all the projects allowing this are either deprecated or too convoluted. The fact that Tcl/Tk is no longer used in general doesn't help.
<EFL
DE-specific.
<XForms, XVT
X11-specific.

By contrast SDL is cross-platform, self-contained, easy to compile, and has a stable API and ABI. Bonus points for having a non viral license (zlib)... No one wants to waste time hunting down a complex toolkit with endless dependencies just to use an application with a couple of dialogs.
Replies: >>7800
>>7799
Nice digits as well.
Untitled.png
[Hide] (219.9KB, 960x828)
>>7758
I made my own UI library and scaling the UI should be as simple as multiplying all the size values with the current zoom level when calculating the element positions. Pic related, the library a bit more complicated than just drawing text and buttons. I haven't implemented scaling due to not needing it myself, but I don't foresee it being difficult at all.
Replies: >>7861
>>7849
This looks good, what did you use? Also is the source available?
>scaling
It's a bit tricky if the layout of the window didn't account for it to begin with. I implemented a "dumb" scaling feature in my program by stretching the window contents by an integer factor (pixel perfect 2x, 3x, 4x...etc) so not the best approach but it gets the job done on my screen.
Replies: >>7862
UI_library_versions.png
[Hide] (3.1KB, 121x185)
>>7861
>what did you use
I'm not sure what you're asking. Win32 api for the window/input, stb_truetype for font rendering, stb_image for loading images, language is C.

>It's a bit tricky if the layout of the window didn't account for it
My UI system is inspired by HTML/CSS so it works very similarly. You nest nodes together, give them parameters like padding and minimum width, and then you can just call a function that recalculates all the element positions and sizes automagically to whatever boundaries you give it. Multiplying all the margins and font sizes and such by 1.5 somewhere along the way would scale it all up exactly as a webpage would.

>is the source available?
Not at the moment. I've wanted to make a good UI library and release it, but it's a struggle (pic related) to make something I'm truly happy with.
Replies: >>7897
>>7862
>Win32 api for the window/input, stb_truetype for font rendering, stb_image for loading images, language is C.
That answers my question, thanks. I like the minimal dependencies but was hoping for something cross-platform.
>it's a struggle (pic related)
Write down the goals for your project and stick to them, put limits on the features so the project doesn't grow too big. You don't have to make a "full featured" GUI lib, just something that works fine for a given purpose.
gui.webm
[Hide] (337.7KB, 1280x720, 00:12)
I made an immediate mode GUI library for my own use in the past, but as of now I haven't used it for anything at all.
It has fractional scaling (the fraction I pass to all widgets is just the display's DPI multiplied by the scaling factor), supports IMEs, and has basic text & image clipboard support. While it does work well and the architecture is quite simple, I have only implemented text, buttons and text edit fields so far, nothing else.
Bloat-wise, it currently hard-depends on Skia, ICU and X11, but all three can be refactored away with zero effort because I kept the code reasonably organised. Not like I really want to actually refactor away Skia, since while it is responsible for 95% of the binary size, it is extremely fast, saves me from having to bother with any OpenGL headache, I get to render vector graphics for basically free, and I can easily port this to a platform with no GPU.
DSC_0455.JPG
[Hide] (9.6MB, 4000x3000)
Get a low res monitor. Simple as.
You can basically get them for free. I have saved dozens from the dumpster. Some 16:9, though obviously 4:3 is more common as it's all mid 2k tech.
Replies: >>9250 >>9251
>>9249
Pic not related
DSC_0472.JPG
[Hide] (4MB, 4000x3000)
>>9249
Picrelated
Replies: >>9255
>>9251
based old samsung syncmaster 3:4s.  bought a bunch of them back in the day when you still had to worry about a dead pixel here or there, and from the nice white balance to the resolution they remained my favorites despite everybody going for yucky widescreens.  just dual them up for more betteration :D
Replies: >>9263
>>9255
Actually, the one on the picture is 16:9 lol. But I have plenty of 4:3s. Just found a 1600:1200 high end IPS a few days ago. Great monitor. Downside is the high latency (not for gayming) and 80w power draw.
Replies: >>9264
>>9263
Though I'm aware 1600*1200 is not exactly low res anymore. 
Point is there are plenty of low res fuckers being thrown away and OP wouldn't have to bother with annoying scaling shit.
[New Reply]
29 replies | 8 files
Connecting...
Show Post Actions

Actions:

Captcha:

Select the solid/filled icons
- news - rules - faq -
jschan 1.4.1