Resizing file chooser panel

If you have problems understanding something or getting started, ask here

Moderator: joepal

Resizing file chooser panel

Postby Geoff » Sun Jan 31, 2021 5:43 am

I would like to change the width of the right hand side filechooser widget of the interface but whilst I have found where to change the icon size in proxychooser.py I have been unable to find or recognize the script that sets up the main window proportions. I have used the scripting plugin which has the option to change the canvas size but on resizing the canvas it also shrinks the overall window width. If someone can point me to the py file to modify my tired old eyes will be grateful.
Geoff
 
Posts: 12
Joined: Mon Dec 28, 2020 12:28 pm
Location: Australia

Re: Resizing file chooser panel

Postby punkduck » Sun Jan 31, 2021 11:09 pm

You are a newbie?

Took me a few hours, this code needs to be rewritten it is so dynamic that nobody understands it (except the first programmers. but I guess they run away and hide somewhere not to answer questions) :lol:

To change the width of the right "filechooser" column, I did the following:

check for this code in lib/qtgui.py (approx. around line 1652)

Code: Select all
def minimumSize(self):
        if self._child is None:
            return super(VScrollLayout, self).minimumSize()
        # log.debug('VScrollLayout.minimumSize(child): %d %d', self._child.sizeHint().width(), self._child.sizeHint().height())
        left, top, right, bottom = self.getContentsMargins()
        return QtCore.QSize(self._child.minimumSize().width() + left + right, 0)


now change last line to e.g.
Code: Select all
 return QtCore.QSize(self._child.minimumSize().width() + left + right +100, 0)


then you get 100 pixel additional space. It looks better tbh, and btw without glasses I can't see anything on my screen.
Or do you mean sth. different?

Greetings from another old guy from Germany to Australia :)
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Resizing file chooser panel

Postby Geoff » Mon Feb 01, 2021 9:42 am

Hi and thanks very much. The additional 100 pix is shared between both panels but is sufficient to then change the following files

apps\gui\proxychooser.py
in class ProxyChooserTaskView(gui3d.TaskView, filecache.MetadataCacher):
change self.filechooser.setIconSize(50,50) to self.filechooser.setIconSize(100,100) - this changes the icons on Geometries tabs

lib\filechooser.py
in class IconListFileChooser(ListFileChooser):
change self.setIconSize(50,50) to self.setIconSize(100,100) - this changes icons for models on Load tab

plugins\3_libraries_material_chooser.py
in class MaterialTaskView(gui3d.TaskView, filecache.MetadataCacher):
change self.filechooser.setIconSize(50,50) to self.filechooser.setIconSize(100,100) - this changes icons on Skin/Material tab

plugins\3_libraries_pose.py
in class PoseLibraryTaskView(gui3d.TaskView, filecache.MetadataCacher):
change self.filechooser.setIconSize(50,50)to self.filechooser.setIconSize(100,100) - this changes the Pose tab

plugins\2_posing_expression.py
in class ExpressionTaskView(gui3d.TaskView, filecache.MetadataCacher):
change self.filechooser.setIconSize(50,50) to self.filechooser.setIconSize(100,100) - this changes the Expressions tab

plugins\3_libraries_skeleton\skeletonlibrary.py
in class SkeletonLibrary(gui3d.TaskView, filecache.MetadataCacher):
change self.filechooser.setIconSize(50,50) to self.filechooser.setIconSize(100,100) - this changes the Skeleton tab


and you have the punkduck and Geoff UI enhancement.

As is recommended make backups before you change files (must remember to do that one of these days).



Greetings from Australia and stay safe in these unusual times.
Geoff
 
Posts: 12
Joined: Mon Dec 28, 2020 12:28 pm
Location: Australia


Return to Newbies

Who is online

Users browsing this forum: No registered users and 1 guest