BunsenLabs / bunsen-utilities

https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-utilities/
GNU General Public License v3.0
31 stars 21 forks source link

bl-exit/merlin branch - test for icon dimensions #48

Closed capn-damo closed 6 years ago

capn-damo commented 8 years ago

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.

capn-damo commented 8 years ago

Is this OK, at line 413?

            if self.dialogHeight < 100:
                self.dialogHeight = 100
            self.set_size_request(width, self.dialogHeight)
xaosfiftytwo commented 8 years ago

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?

capn-damo commented 8 years ago

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 :)

xaosfiftytwo commented 8 years ago

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...

xaosfiftytwo commented 8 years ago

Maybe create a 'special image' that we use by default when we can not find the configured image? With a prominent question mark?

capn-damo commented 8 years ago

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.

johnraff commented 7 years ago

Can this issue be closed now?

tknomanzr commented 6 years ago

@johnraff should we go ahead and close this?

johnraff commented 6 years ago

Yes, lets.