-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wxGUI: Single-Window GUI: arrangement of basic widgets #1621
wxGUI: Single-Window GUI: arrangement of basic widgets #1621
Conversation
…uff, widget sizes hardcoded
gui/wxpython/main_window/frame.py
Outdated
| self.CreateMenuBar() | ||
| self.CreateStatusBar(number=1) | ||
| self.BuildPanes() | ||
| self.BuildEvents() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to BindEvents
I am leaning now towards the agw one since the wxWidgets one seems to be quite limited for our use case. For example we would like to have the option to group Modules, Data and Display into one side notebook widget, which you can do only with agw. |
This looks really cool! Where will the layer tab go? Is it possible to put it below the data catalog similar to QGIS? |
Yes, we can make it as I suggested here: (1) . So we need to either use the Data Catalog as the Content pane (as this PR suggests) - then all Map Displays will be dockable, or we could use the first opened Map Display as the Content pane and all other Map Displays except the first one will be dockable - this means, however, allowing the user to change it, e.g. suddenly a user wants to place the first Map Display on the second monitor, so he/she changes some settings and the first Map Display become dockable while the second Map Display becomes the Content pane. I would add that people are already used to have some data organization and layer management on the left side and tools on the right side, so I would keep the arrangement in (1). And also having the Map Display in the center looks impressive. :-) Any suggestions about that? Which idea regarding the Content pane you like more @veroandreo? Do you have any other ideas? (1) https://trac.osgeo.org/grass/attachment/wiki/wxGUIDevelopment/SingleWindow/single_window_layout.png |
Yes, that one I like, so user can have control of layer properties
Ok, I see. Indeed, it'd be nice to be able to switch to multiple window by pulling the maps, seems intuitive. However, just to confirm, would having the data catalog as content pane as in the fig above, still allow to place the layer manager below the data catalog as in (1)? If yes, that's perfect. I think placing the layer manager below data catalog is kinda natural, so the user has full control of layers, all in the same side of the screen (this is what I prefer, at least)
So using the map display as content pane would not allow to go back to multiple window layout as we have now, because one of them would always stay as content pane, right?
I'm with you there! I love the layout in (1) ! This is my preferred one. In my personal use, indeed, I'd remove all those dockable panes on the right and only keep data catalog + layer manager (as in 1) on the left, and map display(s) over the rest of the screen :)
|
|
Am 08.06.2021 14:39 schrieb Veronica Andreo:
>> This looks really cool! Where will the _layer_ tab go? Is it
>> possible to put it below the data catalog similar to QGIS?
>
> Yes, we can make it as I suggested here: (1) .
Yes, that one I like, so user can have control of layer properties
> But I cannot decide which panel should take the role of the Content
> pane (non-dockable pane). I think it would be nice to have the
> Single-Window GUI where we can reach the Multi-Window GUI as well
> (only by pulling out Map Displays). In (1) we cannot do that because
> the notebook containing all Map Displays has the role of the Content
> pane.
Ok, I see. Indeed, it'd be nice to be able to switch to multiple
window by pulling the maps, seems intuitive. However, just to confirm,
would having the data catalog as content pane as in the fig above,
still allow to place the layer manager below the data catalog as in
(1)? If yes, that's perfect. I think placing the layer manager below
data catalog is kinda natural, so the user has full control of layers,
all in the same side of the screen (this is what I prefer, at least)
> So we need to either use THE DATA CATALOG AS THE CONTENT PANE (as
> this PR suggests) - then all Map Displays will be dockable, or we
> could use THE FIRST OPENED MAP DISPLAY AS THE CONTENT PANE and all
> other Map Displays except the first one will be dockable - this
> means, however, allowing the user to change it, e.g. suddenly a user
> wants to place the first Map Display on the second monitor, so
> he/she changes some settings and the first Map Display become
> dockable while the second Map Display becomes the Content pane.
So using the map display as content pane would not allow to go back to
multiple window layout as we have now, because one of them would
always stay as content pane, right?
> I would add that people are already used to have some data
> organization and layer management on the left side and tools on the
> right side, so I would keep the arrangement in (1). And also having
> the Map Display in the center looks impressive. :-) Any suggestions
> about that?
>
> Which idea regarding the Content pane you like more @veroandreo [1]?
> Do you have any other ideas?
I'm with you there! I love the layout in (1) ! This is my preferred
one. In my personal use, indeed, I'd remove all those dockable panes
on the right and only keep data catalog + layer manager (as in 1) on
the left, and map display(s) over the rest of the screen :)
+1 also from me for Data catalog as content pane.
|
|
gui/wxpython/main_window/frame.py
Outdated
| .BestSize((self.toolbars[toolbar].GetBestSize())), | ||
| ) | ||
| # set pane sizes according to the full screen size | ||
| self.PANE_BEST_SIZE = tuple(t / 5 for t in wx.DisplaySize()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a note warning about using this function in the documentation, so I suggest to follow it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but then I think it will be a bit more complex, shell I take into consideration two monitors or is it okay if I set the size according to the first monitor? I am in the process of preparing Ubuntu on my second laptop, so now on my VirtualBox I am limited in terms of trying startup for different monitors set as default. :-( But if I get it right, [0] may represent the primary monitor anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if [0] really means primary, it is not written anywhere... if not it could be possible to determine which monitor it is according to GetPosition, but unfortunately, I do not have the second monitor to try it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm.. actually, neither on them work (neither wx.DisplaySize nor wx.Display(0).GetGeometry().Get(Size)... I need to have self.Maximize(True) to extend GRASS on the whole screen. I will have a look on it again tomorrow.
gui/wxpython/main_window/frame.py
Outdated
| @@ -87,7 +92,7 @@ def __init__( | |||
| id=wx.ID_ANY, | |||
| title=None, | |||
| workspace=None, | |||
| size=globalvar.GM_WINDOW_SIZE, | |||
| size=wx.Display(0).GetGeometry().GetSize(), | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be wx.Display().GetGeometry() which gives you the wx.Rect of the display the application was started on.
But wx.DisplaySize() gives me (3520, 1080) when I have 2 displays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you shouldn't need this here since you Maximize the window later, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I already get it. :-) We do not have to deal with different sizes of 2 displays at all.
|
@petrasovaa it works for me, could we merge it? If some problem occurs we can deal with that later. This PR is just the initial simple sketch. |
* develop: wxGUI/Single-Window GUI: arrangement of basic widgets (OSGeo#1621)




This PR deals with the base settings for the full screen layout with main dockable panes.
Map Displays as well as 3D view are not solved in this PR - we just need to prepare the base structure here.
There are two main things that we need to figure out:
Both of these functions work for wx.lib.agw.aui.
But there may be (and probably are) more things that are not implemented for wx.AUI. But I think we do not have to make the decision about the library right now.