Jump to content
The Dark Mod Forums

DarkRadiant 2.11.0 available


Recommended Posts

2 hours ago, peter_spy said:

Btw. is there a way to have embedded perspective and ortho views, but with Media browser floating or placed elsewhere, UE3 style? I ended up with floating windows because media browser made perspective window small and it wasn't exactly fast to work with, so I moved it to the second monitor, like this:

I don't mind adding another screen layout, if it really helps productivity.

  • Thanks 1
Link to comment
Share on other sites

5 hours ago, greebo said:

I don't mind adding another screen layout, if it really helps productivity.

It would be interesting to see if the wxWidgets AUI functionality is suitable

https://wiki.wxwidgets.org/WxAUI

Apparently it is supposed to provide the sort of customisable dock-based interfaces that you get in certain modern applications, but I haven't done any testing to see if it is suitable or would work with DR.

Link to comment
Share on other sites

I added an experimental AUI-based layout.

aui.thumb.png.109d46cfdf31e6bce6855ed67b2aca02.png

The API seems promising; the dock panels can be moved around as you wish, and can be floated as separate windows, meaning that the layout @peter_spy wants (with just the properties panel floating) could be achieved very easily.

The major annoyance at the moment is that the dock panels start out really small at the left and right edges of the window, almost like toolbars, and have to be manually dragged to fill the window. I guess there is something weird going on with size hints.

  • Like 3
Link to comment
Share on other sites

5 hours ago, greebo said:

Great, I like this a lot! Let's hope the docks support some kind of saving/restoring, then I'm all for replacing the 4 existing layouts with AUI-based ones.

They do. There are SavePerspective() and LoadPerspective() methods on the AUI manager which can import/export the configuration to strings, which can then be saved in the registry. I haven't got it to work yet, but I assume it's just something I'm doing wrong and needs more debugging.

If this can be made to work well I'm definitely in favour of getting rid of the old-style hard-coded layouts as well as the wonky position/size-saving code which has always been unreliable on my Linux system.

  • Like 2
Link to comment
Share on other sites

Well it was worth a shot, but it turns out wxAUI is useless, unmaintained junk that simply doesn't work as advertised. In particular:

  • The saving and loading is absolutely broken. Even if I pass back the exact string that it dumped out to the console, copied into a hard-coded string in code, all that happens is every single panel disappears, making it worse than no persistence at all.
  • There is no way to fix the size issues with the panels. The only thing which works is setting a minimum size, which means the user can no longer shrink the panels down. The "best size" value is completely ignored by the initial layout; it only applies if you float the panels and then re-dock them with the mouse.

These two factors combined effectively make it impossible to layout the panels to mimic the embedded layout, taking up the entire window. The panels can only be initialised as two small strips along the left and right edges (determined by the minimum size) with a large grey space in the center. Similar problems have been reported by other users years ago but nothing is ever fixed, just a few comments from developers insisting there isn't actually a problem.

Of course it's possible that the behaviour is very different between Windows and GTK backends, and maybe between wxWidgets versions (we already know there are a fair number of bugs with the 3.0.x series on Linux).

  • Sad 1
Link to comment
Share on other sites

Oh man. I could give it a shot by compiling against the wx3.1 sources in Linux to see if it's as broken there. The dev cycles of new stable releases are almost painfully long in wxWidgets, the 3.1 branch has a few wxGTK bugs less and has been there for years. Users are even "encouraged to use this release, including in production", but it's still not available in a single Linux distro.

Link to comment
Share on other sites

15 hours ago, greebo said:

Oh man. I could give it a shot by compiling against the wx3.1 sources in Linux to see if it's as broken there.

Sure, by all means have a go if you like. Most changes are committed into my master branch, although late last night I finally worked out how to default the panel sizes (it's a horrible hack, requiring you to set initial minimum sizes of half the main window size, add the panels, then set the minimum sizes back to 128x128 so the user can shrink the panels again) and this isn't committed yet. EDIT: This is now committed.

I think at this point its functional enough to remain in the software as an optional new layout, but without the persistence it cannot be a replacement for all of the other layouts.

One thing I haven't checked yet is whether the persistence does work but all the panels are just hidden by default for some reason. There are options to hide and show panels which I haven't used but perhaps their default value is changing.

Quote

The dev cycles of new stable releases are almost painfully long in wxWidgets, the 3.1 branch has a few wxGTK bugs less and has been there for years. Users are even "encouraged to use this release, including in production", but it's still not available in a single Linux distro.

I'm beginning to wonder if we should just skip whatever version of wxWidgets Linux distros install, and instead have a Git submodule pointing directly to wxWidgets source which we compile ourselves. I think they are using CMake as well so integration probably wouldn't be that difficult, and it is consistent with the direction software seems to be moving in (Snaps, FlatPak, AppImages etc which always bundle the complete set of libraries, including GTK and the like, so you never have to worry about what is available on the distro).

Link to comment
Share on other sites

Well I managed to get the persistence working at last.

The clue was in the fact that calling _auiMgr.LoadPerspective(_auiMgr.SavePerspective()) worked fine, indicating that the saving and loading code wasn't fundamentally broken, but something was wrong when the saved perspective from one session was loaded into the next session.

Following the clues in this thread, it turns out that if you don't give the panels deterministic internal names (which is not the same as their user-visible caption), wxWidgets auto-generates a named based on some internal data (maybe pointer addresses) which do not match between sessions, resulting in failure to load the persisted data. I still consider it a bug that the result of this failed operation is all the panels disappearing; after all if wxWidgets cannot match layout data to panel names, it should just leave the panels in their default state, not set them to invisible.

Link to comment
Share on other sites

Ah yes, this actually sounds familiar, the DevExpress (WPF) dock manager I once used had the same requirement - one had to set the IDs or the Names of the panels in order to have their layout restored properly. Nice you could track that down, there's not much missing now, is there?

Link to comment
Share on other sites

6 hours ago, greebo said:

Nice you could track that down, there's not much missing now, is there?

No, it's definitely ready to go in at least as an additional layout option. I'll create a suitable bugtracker ticket.

Of course we'll want to be sure that it works well on a range of systems before using it as the basis for all the existing layouts, but it's looking promising so far (I withdraw my comment that it is "useless", but I still feel it is somewhat confusing and could be made more robust).

  • Like 1
Link to comment
Share on other sites

  • greebo unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...