Spyder: Add options to increase/decrease icon size in toolbars

Created on 23 May 2019  路  12Comments  路  Source: spyder-ide/spyder

Problem Description

This is part of https://github.com/spyder-ide/spyder/issues/9004 Epic.

As suggested in https://github.com/spyder-ide/spyder/issues/8075, the idea is to add an Icon size option so that it is possible to increase/decrease icon size in toolbars.

I think there should be 3 options to choose from: small, normal, and large.

Obviously, this option should affect the icon size in the toolbar of the main interface, as well as the icons of the working directory plugin.

But what about the icon size in the toolbars of the other plugins like the outline explorer and plots plugins? @ccordoba12 @goanpeca any thoughts? Once this question is settled, I will submit a PR to implement this.

image

image

Preferences Ui future

Most helpful comment

Good thinking, I will keep that in mind.

I have a PR with a POC that should be ready soon.

All 12 comments

icon_size_option

I guess the other plugin toolbars should be updated as well?

Currently, some plugins use a hard coded value of 16 px for their toolbar icon size, but most don't set any value and use the system default (which is also 16 px on my system also).

In that case should we remove those hardcoded values?

In that case should we remove those hardcoded values?

Yes, I agree with you.

In QGIS, this is how it is done.

There is 5 options for the main toolbar: 16 px, 24 px, 32 px, 48 px, 64 px. The icon size of the plugins are set one size smaller than the main toolbar (except for the 16 px option where it is set to 16 px also).

icon_size_option_qgis

I like it. Makes sense lets do this 馃槢

hehe ok, I'll implement this as is then 馃憤 Shouldn't be too hard.

@jnsebgosselin maybe this is a good time to normalize standarize the buttons we add to pugins.

For instance the plot viewer looks like this (nice padding around buttons
Screen Shot 2019-05-24 at 20 17 29

Other plugins don't look so good:

Screen Shot 2019-05-24 at 20 18 15
Screen Shot 2019-05-24 at 20 18 10
Screen Shot 2019-05-24 at 20 18 04

We should probably always use tooltbars and have that in the stye guide?

Good thinking, I will keep that in mind.

I have a PR with a POC that should be ready soon.

In my POC, I want to add a new SpyderPluginToolbar class. Where should this go?

I've added it to .\spyder\api\plugins.py, but I'm not sure this is where this should go. Maybe it should be added to a new toolbar.py file in .\spyder\widgets?

Please add that class to spyder/api/toolbar.py.

Was this page helpful?
0 / 5 - 0 ratings