Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprites #490

Merged
merged 21 commits into from
Feb 23, 2024
Merged

Sprites #490

merged 21 commits into from
Feb 23, 2024

Conversation

pconesa
Copy link
Contributor

@pconesa pconesa commented Jan 10, 2024

users:

  • New Icons.
  • Icons based on sprites, easier to resize or customized
  • New variable: SCIPION_SPRITES_FILE to point to a custom sprite. It should be compatible with sprites.png at pyworkflow/resources.
  • Scipion GUI log moved to the log tabs and removed from menu
  • New variable: SCIPION_SHOW_TEXT_IN_TOOLBAR, set it to anything to show the text of the icons below developers:
  • ProjectConfig class removed
  • New methods in path: hasChangedSince and isFileFinished
  • New method in utils: strToDuration (useful to translate "1h 35m" to seconds). For duration parameters.
  • New class Variable to be tested in Config class. A step towards a Config editing GUI.
  • SCIPION_DEBUG_SQLITE rescued to activate SQL clauses in debug.

users:
  - New Icons.
  - Icons based on sprites, easier to resize or customized
  - New variable: SCIPION_SPRITES_FILE to point to a custom sprite. It should be compatible with sprites.png at pyworkflow/resources.
  - Scipion GUI log moved to the log tabs and removed from menu
  - New variable: SCIPION_SHOW_TEXT_IN_TOOLBAR, set it to anything to show the text of the icons below
developers:
  - ProjectConfig class removed
  - New methods in path: hasChangedSince and isFileFinished
  - New method in utils: strToDuration (useful to translate "1h 35m" to seconds). For duration parameters.
  - New class Variable to be tested in Config class. A step towards a Config editing GUI.
  - SCIPION_DEBUG_SQLITE rescued to activate SQL clauses in debug.
Copy link
Contributor

@JorMaister JorMaister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icons look quite good! But, at least in my case, the protocol list panel on the left shows now the Beta labels very big. Am I missing something?

image

@pconesa
Copy link
Contributor Author

pconesa commented Jan 10, 2024

no, sprites are a 32 pixel size that is too much.... I plan to make them back to 16 with a "zoom" parameter at 50% then will be back to normal. In case someone wants a bigger zoom then this may appear... unless we find a way to make trees respond to icon sizes. I failed so far.

@pconesa
Copy link
Contributor Author

pconesa commented Jan 10, 2024

@plosana will work on the other icons still to change. Once ready this can be merge. I change it to draft for now

@pconesa pconesa marked this pull request as draft January 10, 2024 11:41
@azazellochg
Copy link
Member

Since you are working on this, could we please change the order of buttons? It takes me 5 seconds to find the stop protocol or browse button. The most used buttons should go first.

@pconesa
Copy link
Contributor Author

pconesa commented Jan 10, 2024 via email

@plosana
Copy link
Contributor

plosana commented Jan 10, 2024

Hi everyone! I agree with Grigory that I find more intuitive a different order for the icons. I did a bit of a study grouping the icons by the functionality that they had and came up with this:
image

To me, a more intuitive order would be the one I propose below, but any ideas are welcome :)
image

@delarosatrevin
Copy link
Member

delarosatrevin commented Jan 10, 2024 via email

…ns at 24x24. 100 will set them to 32 or 50 to 16.
@azazellochg
Copy link
Member

@plosana that looks beautiful! Labels are definitely helpful, otherwise I often have to hover over every button to find the meaning 😁

@pconesa
Copy link
Contributor Author

pconesa commented Jan 11, 2024

There is a variable to Show or not the labels. Do we want it active by default?

@azazellochg
Copy link
Member

Yes please 🥺

@plosana
Copy link
Contributor

plosana commented Jan 11, 2024

Yes!! I believe it would be very very helpful

@JorMaister
Copy link
Contributor

After the last changes, it looks nice! I've checked all the windows with icons and they all behave well in terms of appearance. My only question is regarding the "Browse" window, if the last two options of the toolbar ("Recent" and "Protocol folder") not have an associated icon, or it is not being displayed properly.

image

@JorMaister
Copy link
Contributor

On the other hand, I had some execution problems when using this branch. Here's an example:

00001: Traceback (most recent call last):
00002: File "/home/jjimenez/scipion3/scipion-pyworkflow/pyworkflow/protocol/protocol.py", line 203, in run
00003: self._run()
00004: File "/home/jjimenez/scipion3/scipion-pyworkflow/pyworkflow/protocol/protocol.py", line 254, in _run
00005: resultFiles = self._runFunc()
00006: File "/home/jjimenez/scipion3/scipion-pyworkflow/pyworkflow/protocol/protocol.py", line 250, in _runFunc
00007: return self._func(*self._args)
00008: File "/home/jjimenez/scipion3/scipion-em-emantomo/emantomo/protocols/protocol_template_matching.py", line 136, in prepareEmanPrj
00009: self.convertOrLink(inTomoName, tomo.getTsId(), TOMOGRAMS_DIR, sRate)
00010: File "/home/jjimenez/scipion3/scipion-em-emantomo/emantomo/protocols/protocol_base.py", line 208, in convertOrLink
00011: self.convertBetweenHdfAndMrc(abspath(inFile), outFile, extraArgs=f'--apix {sRate:.3f}')
00012: File "/home/jjimenez/scipion3/scipion-em-emantomo/emantomo/protocols/protocol_base.py", line 212, in convertBetweenHdfAndMrc
00013: program = Plugin.getProgram("e2proc3d.py")
00014: File "/home/jjimenez/scipion3/scipion-em-eman2/eman2/init.py", line 114, in getProgram
00015: return f"{cls.getActivationCmd()} && {cmd} {program} "
00016: File "/home/jjimenez/scipion3/scipion-em-eman2/eman2/init.py", line 108, in getActivationCmd
00017: cls.getEmanEnvActivation())
00018: File "/home/jjimenez/scipion3/scipion-em-eman2/eman2/init.py", line 100, in getEmanEnvActivation
00019: scipionHome = Config.SCIPION_HOME + os.path.sep
00020: TypeError: unsupported operand type(s) for +: 'Variable' and 'str'
00021: Protocol failed: unsupported operand type(s) for +: 'Variable' and 'str'

@pconesa
Copy link
Contributor Author

pconesa commented Jan 11, 2024

Thanks JOrge, I think we need to overload more methods of the Variable class. I'll fix it

@pconesa
Copy link
Contributor Author

pconesa commented Jan 11, 2024

Those "actions" never had an icon.

@JorMaister
Copy link
Contributor

Haha, my bad! Sorry

@pconesa
Copy link
Contributor Author

pconesa commented Jan 11, 2024

If you pull latest changes there should be no error with the plugin now.

@JorMaister
Copy link
Contributor

Solved! Thanks

@pconesa pconesa marked this pull request as ready for review February 22, 2024 15:27
Copy link

sonarcloud bot commented Feb 22, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@fonsecareyna82 fonsecareyna82 merged commit 4af4165 into devel Feb 23, 2024
1 check passed
@fonsecareyna82 fonsecareyna82 deleted the sprites branch February 23, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants