[Query] Possible to control tool panel size programmatically?

Hi, Not a feature request but a query. Is there currently a way to change tool panel sizes with a command, either in absolute terms or as a fraction of another parameter value? Cheers, Yang

Hi Yang, No, there is no command for setting tool window sizes. What is the use case would be where you would want a command for it? Also, a single tool can have multiple windows open, so I’m not even sure how you would refer to a particular window in a command. --Eric Eric Pettersen UCSF Computer Graphics Lab
On May 2, 2024, at 7:47 AM, leeyang+chimerax--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
Not a feature request but a query. Is there currently a way to change tool panel sizes with a command, either in absolute terms or as a fraction of another parameter value?
Cheers, Yang _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Eric, I see. For ease of windows management, I have most of my tools docked. However, resizing the monolithic window often results in changes to the sizes of tool/button panels as ChimeraX maintains their relative proportions. I was wondering if I could put together a set of alias-ed presets that would resize and arrange these elements to match the common viewport sizes I tend to use, e.g. to pair better with different monitor setups, or for ease of returning to a set state having resized away for whatever reason. I've just been tweaking my presets for (old) COOT and was inspired to see if I could do the same with my ChimeraX setup. No worries if no such mechanism exists. I can well appreciate the complexity involved in refactoring. Cheers, Yang On Fri, 3 May 2024 at 00:00, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Yang, No, there is no command for setting tool window sizes. What is the use case would be where you would want a command for it? Also, a single tool can have multiple windows open, so I’m not even sure how you would refer to a particular window in a command.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On May 2, 2024, at 7:47 AM, leeyang+chimerax--- via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi,
Not a feature request but a query. Is there currently a way to change tool panel sizes with a command, either in absolute terms or as a fraction of another parameter value?
Cheers, Yang _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Eric, I see. For ease of windows management, I have most of my tools docked. However, resizing the monolithic window often results in changes to the sizes of tool/button panels as ChimeraX maintains their relative proportions. I was wondering if I could put together a set of alias-ed presets that would resize and arrange these elements to match the common viewport sizes I tend to use, e.g. to pair better with different monitor setups, or for ease of returning to a set state having resized away for whatever reason. I've just been tweaking my presets for (old) COOT and was inspired to see if I could do the same with my ChimeraX setup. No worries if no such mechanism exists. I can well appreciate the complexity involved in refactoring. Cheers, Yang

Hi Yang, Sorry, we have no direct support for that. You could write your own Python-based preset that looks at session.ui.main_window (which is a QMainWindow <https://doc.qt.io/qt-6/qmainwindow.html#addDockWidget> instance), uses findChildren() to get the QDockWidget instances, and resizes them based on their windowTitle attribute. Hacky, but might work. --Eric
On May 2, 2024, at 4:27 PM, leeyang+chimerax--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Eric,
I see. For ease of windows management, I have most of my tools docked. However, resizing the monolithic window often results in changes to the sizes of tool/button panels as ChimeraX maintains their relative proportions.
I was wondering if I could put together a set of alias-ed presets that would resize and arrange these elements to match the common viewport sizes I tend to use, e.g. to pair better with different monitor setups, or for ease of returning to a set state having resized away for whatever reason. I've just been tweaking my presets for (old) COOT and was inspired to see if I could do the same with my ChimeraX setup.
No worries if no such mechanism exists. I can well appreciate the complexity involved in refactoring.
Cheers, Yang _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (3)
-
Eric Pettersen
-
Lee Yang
-
leeyang+chimerax@gmail.com