Skip to content

PR: Add mode display#52

Merged
goanpeca merged 3 commits intospyder-ide:masterfrom
bgallois:mode_display
Jun 6, 2020
Merged

PR: Add mode display#52
goanpeca merged 3 commits intospyder-ide:masterfrom
bgallois:mode_display

Conversation

@bgallois
Copy link
Copy Markdown
Contributor

I replaced the static label "Vim:" by the currently selected mode (normal, visual, v-line or insert) enhancing clarity for the user.

@ccordoba12 ccordoba12 added this to the v0.1 milestone May 19, 2020
@ccordoba12
Copy link
Copy Markdown
Member

@bgallois, could you post a screenshot of things look now?

@goanpeca
Copy link
Copy Markdown
Contributor

goanpeca commented May 19, 2020

Awesome work @bgallois!

Could you include a screenshot :-) ?

@bgallois
Copy link
Copy Markdown
Contributor Author

It's looking like that:

spyder_vim

@ccordoba12
Copy link
Copy Markdown
Member

Pretty cool @bgallois!

@goanpeca, please suggest @bgallois some colors that work for both the dark and light modes (I think the current ones don't work very well in both).

@goanpeca
Copy link
Copy Markdown
Contributor

goanpeca commented May 22, 2020

@bgallois you have a couple of choices, you could use the colors that the codeeditor.py already defines for some things

        self._facecolors = {
            'warning': QColor(editor.warning_color),
            'error': QColor(editor.error_color),
            'todo': QColor(editor.todo_color),
            'breakpoint': QColor(editor.breakpoint_color),
            'occurrence': QColor(editor.occurrence_color),
            'found_results': QColor(editor.found_results_color)
            }

Editor in this code is `codeeditor.py``

The other option is to use the colors from the currently selected theme for the code editor, this is stored in the appearance section of the config

from spyder.config.gui import get_color_scheme, is_dark_interface
theme_dictionary = get_color_scheme(CONF.get('appearance', 'selected')

Also using is dark interface could help you select which theme so we could probably stick to spyder and spyder/darkthemes depending on is_dark_interface.

Let me know how it goes.


Also a little nitpick, could we make the width of the label fixed and equal to the largest word?

Having the width change on mode change could get annoying pretty fast :-)

Thanks for the hard work!

@ccordoba12
Copy link
Copy Markdown
Member

Also a little nitpick, could we make the width of the label fixed and equal to the largest word?

Totally agree with this.

@bgallois
Copy link
Copy Markdown
Contributor Author

I fixed the label width and changed the colors based on the dark or light spyder theme.

spyder_vim

@goanpeca
Copy link
Copy Markdown
Contributor

Awesome! Thanks for the fix!

@ccordoba12
Copy link
Copy Markdown
Member

@bgallois, please solve the merge conflicts so we can merge this one.

@goanpeca
Copy link
Copy Markdown
Contributor

goanpeca commented Jun 6, 2020

Thanks for working on this!

@goanpeca goanpeca merged commit 609d2ee into spyder-ide:master Jun 6, 2020
@bgallois bgallois deleted the mode_display branch June 23, 2020 19:45
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.

3 participants