~theclapp


#32 Sourcehut Pain Points a month ago

Comment by ~theclapp on ~eliasnaur/gio

I'd be happy to link to a github mirror if someone steps up to maintain it.

I push to https://github.com/theclapp/gio-mirror almost every time I pull from Sourcehut, though sometimes I forget or just don't get around to it. (Or sometimes I just don't pull as often as you commit, of course.) But I think it's kept up to date enough to be useful.

#86 Add ability to change the window title dynamically. a month ago

Ticket created by ~theclapp on ~eliasnaur/gio

Right now you set the window title at application initialization. I'd like to update it dynamically.

#29 Wayland window bar 2 months ago

Comment by ~theclapp on ~eliasnaur/gio

there is no bar at the top and so it cannot be moved, minimized or resized

For what it's worth, in GNOME, at least, it looks like you can alt-drag to move, and alt-right-click to get a menu that has minimize, maximize, move, and resize.

This is on a Virtual Box vm running on a Mac, logged in using the GNOME option (i.e. not the Weston option which just seems to give me a black screen). So a) your mileage might definitely vary, and b) when I say alt-drag what I actually did was cmd-drag, and alt-right-click was actually cmd-two-finger-tap.

This is not to take away from the core issue of this bug report, just to offer something that might help as a workaround. If you knew all of the above already, my apologies.

#85 Editor.SetText during event processing leaves Editor in an inconsistent state that can lead to a panic 2 months ago

Comment by ~theclapp on ~eliasnaur/gio

That does seem to do the trick. Thanks for the quick turnaround!

#85 Editor.SetText during event processing leaves Editor in an inconsistent state that can lead to a panic 2 months ago

Ticket created by ~theclapp on ~eliasnaur/gio

I sense the DownArrow key during layout, and set the Editor text via SetText, and them Move to len(theText). If the old text was multiple lines and the new text is a single line, then when the editor's Layout is called immediately afterwards (during the same top-level layout), it too tries to process the DownArrow key and panics, because the editor's lines slice is out of date with respect to the underlying editBuffer (Editor.rr).

It seems to fix the problem (or at least hide it) if I hack Editor.processEvent to abort if !e.valid. But that doesn't seem right — it seems like it might lead to too many events being skipped.

But I'm not really sure, so I'm submitting a bug report instead of a patch.

If I queue the SetText to run after the toplevel layout completes, then that also works, because the editor text and the editorBuffer text are still in sync when the editor tries to process the DownArrow key, and then the text is changed after that. That works around the problem, but I think the core of it is still that SetText leaves Editor.lines and Editor.rr out of sync.

#82 Webassembly Freezes in some cases 2 months ago

Comment by ~theclapp on ~eliasnaur/gio

Webpack is a packager for web apps, so at a guess you're running this in a browser as webassembly?

First of all, running an http GET in the event loop is a terrible idea, webpack or not. Layout events can happen tens or even hundreds of times per second. Any kind of long running process should be in a separate goroutine.

This is just a guess, but I wouldn't be surprised if the http Client is not implemented in the webassembly code. So quite possibly your log.Fatalf is biting you. That's where I'd look first.

But also take that GET outside of the event loop.

#34 Give a way for layout.List{Invert:true} lists to behave like Invert=false when scrolled 4 months ago

Comment by ~theclapp on ~eliasnaur/gio

So I'll give that a shot.

I gave that a shot, and it did work ... and it also got me started down the road to https://lists.sr.ht/~eliasnaur/gio-patches/patches/9145, layout: make List scroll position settable.

#34 Give a way for layout.List{Invert:true} lists to behave like Invert=false when scrolled 4 months ago

Comment by ~theclapp on ~eliasnaur/gio

Is there any way to programatically scroll a list? ...

I've developed a use-case for this. :)

I think, for me, it'd be sufficient to be able to a) get the index of the top item on the list, and b) set that index as the top item of the same list, at a later time. Basically I display a list, scroll it, display another list, go back to the previous list, and I'd like to display it at the same spot it was before.

... As I wrote that I realized I could conceivably just display a new list on top of the old one, or create a new list object, display it, and then swap the old one back in again.

So I'll give that a shot.

That said, this approach will not apply to every situation (and might not work for me!), so being able to programmatically move or scroll a list will still come in handy eventually.

#58 Way to close a window programmatically 5 months ago

Comment by ~theclapp on ~eliasnaur/gio

Gio currently supports only a single top-level window, so exiting the program will close the window. There may be a better way.

#53 app/internal/window: incorrect monitorScaling value in desktop drivers 5 months ago

Comment by ~theclapp on ~eliasnaur/gio

I know very little about font sizes and whatnot. My 2-month-old MacBook Pro from work says it's 15.4-inch (2880 x 1800), but then the display setting says its default for the device looks like 1680 x 1050 (a reduction of exactly 7/12 on both dimensions, if you were curious). If I set it to more space it says that looks like 1920 x 1200. I frequently hook up external monitors, one of which is a 4k; I'm away from it right now so I can't tell you want it says about its resolution. I mention all that in case it's useful, but wouldn't be surprised if it's not. :) No worries.

To be honest, I a) don't feel like I know enough to comment intelligently on the issues, even given y'all's detailed explanations, and b) don't really see a question in either of your posts. What are you asking of us? Is there some program to run or setting to set and report back on our impressions of the results? (If so, I'm happy to do that, but again, I don't see that?)

So all that said ... one of an IMGUI's strengths is that it redraws the entire window for each frame. My point being that it seems like none of these values should necessarily be set in stone (i.e. necessarily compile-time constants). Is there any reason you couldn't make any or all of these values tweakable by the user, either the developer or even the end-user? Could you build a UI that shows some sample text and gives you 3-4 sliders and lets you adjust all values and see the results in real-time?

Admittedly, such a thing might be seen as actively user-hostile. (You want me to WHAT?) But, I dunno, maybe it would only be for exceptional circumstances (Yo, I have 20/100 vision, how can you help me? or Yo, I'm running an app on a Jumbo-Tron in a sports stadium, how can you help me? :), or better yet only for a little while, until we (you) got a better idea of what works and what doesn't, what looks good and what doesn't, on the varieties of hardware we all expect to run on.

What do other GUI toolkits do? Maybe this is either a solved problem out there somewhere, or an admittedly UN-solved problem that everybody sucks at.