Closed capn-damo closed 6 years ago
Is this OK, at line 413?
if self.dialogHeight < 100:
self.dialogHeight = 100
self.set_size_request(width, self.dialogHeight)
I would create a variable 'min_dialogHeight', set it to 100 and test against the variable. If it needs to be changed, then there is only one line to change.
Scratch the above!!
I would set dialogHeight to -1 as default in the program This means that the window height is determined by the height of its children.
And make dialogHeight in the config file optional. We specify 120 for the default dark and light themes. If the user changes it to something else, less than the height of the icons, it is his choice, and we have to honour it.
I would leave out the test for min-dialogHeight.
I will change the program accordingly, unless you object?
Sorry, I missed your reply before I pushed a FIX.
I added a function to get the icon height, and dialogHeight takes this as its minimum value, even if set smaller in the ini file. The user can set it to whatever they want, but it can never go smaller than the icons.
I guess it should also test for, and use, the largest icon in case they are different sizes :(
EDIT: Now it gets max icon size, and uses that for minimum dialogHeight :)
Changed setting self.dialogHeight slightly.
Do we require png images? Is that not too strict? Aborting if it is not a png? Too harsh IMO. I'd prefer to log a message and continue...
Maybe create a 'special image' that we use by default when we can not find the configured image? With a prominent question mark?
Do we require png images? Is that not too strict? Aborting if it is not a png? Too harsh IMO. I'd prefer to log a message and continue...
png's have transparency, and an easy format for people to produce their own, or grab from an existing icon theme. Dealing with svg is more problematic AFAIK.
I have tried it with a jpg, and the script continues and displays a little placeholder icon. I agree that a default icon would be better.
Can this issue be closed now?
@johnraff should we go ahead and close this?
Yes, lets.
ATM the default icons are 100x100px, but the gui panel can be set to any height. This means that the images are cut off if the height is less than 100.
Either we could limit the panel height to 100px minimum, or allow scaling of the icons (say between about 48 and 128). Scaling is a neater solution IMO, but I think the buttons should be proportional to the icon, not the window.