-
Notifications
You must be signed in to change notification settings - Fork 0
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
when sidebar is in focus: visible effect of the tab #6
Comments
The editor highlights the current line. If no line is highlighted, the editor does not have focus. You can change the color to make it easier to see. Color scheme files are in
I just did some testing, and this is not possible. The problem is I'm not able to connect to any signals to find out when the Preview tab gets and loses focus.
Since you are working with HTML files, maybe there is something you could do with javascript? YouTube stops video playback when the page loses focus. So there must be a way to detect and respond to it. |
That is not true. Here is the evidence: You write:
So, to detect when tab gets and loses focus does exist only for the editor and not for the sidebar? |
Okay.
I'll look at the editor some other time to see if it is doing anything special. But right now, this is most likely not possible. |
@ralf3u I found a different signal I can use. It's not specifically for focus, but I can check for focus after receiving it. There are new options in the config file: By now you know the routine... reset config, save config, edit config, reload config... etc. |
Yes!! It's nearly perfect. issue 1 issue 2 Thank you for an answer in advance. |
I'll take a look. I'm probably going to move this feature to a different plugin.
I'll make it customizable later. |
I forgot to mention also the plugin Filemanager (or something like this) that I'm using. It shows all documents of a certain file in a tab in the sidebar. So, also that tab should have the green font-color when it is in focus and if preview_tab_focus_green=true. remark: I don't see so much the necessity in preview_tab_focus_bold because in the editor the title of the tab that is in focus is also not bold. |
@ralf3u I put this feature in a different plugin. Basically it is for miscellaneous stuff that doesn't really belong in the Preview plugin. It will be in the PPA shortly. The package name is
The new plugin has similar buttons and menu items to edit the config files as the Preview plugin. The color of the tabs can be changed. After you get this working, I will remove the tab highlighting from the Preview plugin. |
Wow!! From the effect level it is marvelous!! issue 1 issue 2 issue 3 remark: behavior that I like: |
Should be fixed. New version will be in the PPA when it's done building. Will address other issues in the other thread. |
Implemented in another plugin: https://github.com/xiota/geany-tweaks |
Today I can't reproduce the issue 1 any more, so it is fixed.
Issue 2 is not fixed. Only after the third press it works nearly perfect: It is green when it should not be green, and vice versa.
Issue 3 is not fixed. I'm sure that there is a solution, because if I click with the mouse on the Preview-tab and if I do tab-browsing in the sidebar with shortcuts everything works fine in any direction. I stay always in the sidebar during tab-browsing. But in the described issue 3 it is not the case, because during tab-browsing in the sidebar suddenly I tab-browse in the editor. |
This feature is difficult to get working right. I'll have to look at it some more later. |
issue 3 IF the editor is in focus |
The problem is I need to get signals from the widget to respond to. Without a signal, there's no way to know when something is clicked or has focus or whatever. I'm trying to work around it by responding to multiple signals, but it doesn't work quite right because there are situations when the signals just aren't sent. I've already tried all documented signals. I could try keeping track of state on my own, but there are so many ways of switching focus that it will easily get out of sync. I'll look at it some more later today to try something else. |
@xiota The issue 2 is solved. But issue 3 is not fixed. |
I don't know what "issue 3" is. Please describe what happens and the steps to reproduce. |
|
Thanks. I'll take a look at it. Looks like more problems with signals. |
PPA has been updated with another attempt. |
The issue 3 of this webpage is fixed. issue 4 possible solution model for a possible solution control after the solution was realized |
I don't know what you are describing. Please show a screenshot.
I'll add this if it can be done without restructuring any of the existing code. Otherwise, this has been difficult to implement, and I'd prefer to avoid making changes that will break it. |
That does not happen on my computer. What theme are you using? Try adding: |
Still the same theme:
Where? |
I don't know what package the Arc themes are from, so cannot install them to test.
To |
After restarting Geany it is still there. Help: Two days ago it was not there, so something was added yesterday. |
Not exactly copy/paste, but they're doable. I just think it's outside the scope of the Preview plugin. So it's a matter of deciding whether I want to mess with it and if so, where to put them. I guess I could put them into the Xi/Tweaks or TweaksUI plugins, but it's been a while since I've looked at them, so would have to refamiliarize myself with the code. |
Oh, that would be great! Then all keyboard navigation would work perfect!
I don't think so, because scrolling right away in the Preview with the keyboard (with the arrow-keys) is not an unusual behavior. |
My understanding is xiota/geany-preview#37 is to toggle visibility of the sidebar. xiota/geany-preview#38 is to toggle visibility of the editor. And xiota/geany-preview#40 is to toggle focus between editor and sidebar. I believe xiota/geany-preview#40 is already implemented in Xi/Tweaks. Are you still using that plugin? |
I use Xi/Tweaks only for the colored tab-title of the sidebar. See detailed manual of installation and configuration in #6.
Not at the moment because I reinstalled Lubuntu. But I will use it in the next hours. |
I don't know if it is helpful information when programing the focus-feature for shortcuts, but I just recognized that in Geany, in the Preferences, in Keybindings in the Action |
Here a step-by-description for having a green font color of the tab-title of the sidebar when sidebar is in focus: The code down below need to be added at the end of
Then save the document. If there is still no green effect when sidebar is in focus, specially when using the shortcut "Toggle focus between editor and sidebar", then those things need to be done:
The reason for the code If the content of |
It was my mistake to publish those lines above, because the solution is not to switch focus to the sidebar. The solution is to switch focus to the content area of the Preview-tab. |
I have a question to your comment geany/geany#3289 (comment). You write:
Specially this part of the sentence is for me interesting:
This is for me strange. Because you write in #6:
So, if it is doable with keyboard navigation, then it could be doable also for click navigation by some kind of copy/paste. Then, that would mean that there is only one single issue that could be asked at GTK:
Or I would write it like this to solve #6 and xiota/geany-preview#15: Is this correct? |
This is the problem. Focus switches to the sidebar, but I have no control over which specific widget has focus. I recall you had issues with the wrong tab being highlighted when using the keyboard (arrow keys?) to switch tabs. |
This does not occur with the shortcut "Toggle between editor and sidebar". This does only occur, when clicking on the tab-title of the sidebar (#15). I don't know how to program software. But let's say the shortcut "Toggle between editor and sidebar" is pressed, then a function A is executed that put the content area of the Preview-tab in focus. It runs perfect. Why this function A can not be used, when clicking on the tab-title of the sidebar? Because at the moment it is like this: When clicking on the tab-title of the sidebar, the tab-title is green. |
OK, here another try, but I think it is my last try. I'm not a software developer, but I can program simple JavaScript-code. When the shortcut
The shortcut You write in #6:
But it does work perfect for the shortcut #6 xiota/geany-preview#15 |
#6:
For reasons of documentation: |
Maybe geany/geany pulls/2919 |
On this #6 there is this text:
Thanks to the plugin Xi/Tweaks this is issue is completely fixed for the Preview-tab, but not for the Files-tab (plugin Steps to reproduce
Result Result |
There is also an other issue in Lubuntu 23.10 in Geany 1.38 when using the plugin "File Browser": Steps to reproduce
Result Result |
And there is a last issue in Lubuntu 23.10 in Geany 1.38 when using the plugin "File Browser": Steps to reproduce
Result Result |
You don't need to do anything, because I will make first a test on an other computer. I will be back in some hours. |
I just made some tests on an other computer. Could it be that my last comments has to do something with xiota/geany-preview#15 (comment)? |
The title of this issue is fixed thanks to the plugin Xi/Tweaks. For reasons of documentation here are the settings that work:
|
The code in my last comment is about to have the same design of the tab-title on different panels (editor / sidebar / message window) for the tab that has focus. It is interesting specially for ePaper-displays. Here is an example if someone wants a special design only for the focused tab-title that is in the sidebar:
|
Could you please delete the two labels "enhancement" and "wontfix" because the issue is fixed? |
Remark to the plugin Xi/Tweaks
And then I would put a description in a |
It happened to me already many times that I lost the orientation when working with shortcuts in Geany because I didn't know which pane is now in focus: editor or sidebar.
Let's imagine this situation: A document, that is already saved, is longer than the visible area. The current line is on top of the document. With the mouse the user is scrolling down, so that the current line is not any more in the visible area. Now the user is distracted by something. Then the user looks back on the screen. What is in focus? Is it the editor or Preview? There is no hint at all. Now let's imagine the same situation with visible effect of the tab when sidebar is in focus. Now there is a hint: Because the Preview-tab has no visible effect, it means that the editor is in focus.
So, that were my thoughts today:
An other background-color for the tab would be good. Or an other font-color. Or what about a kind of star-symbol after the word Preview? A symbol after the word Preview could be interesting but I don't like when there is an addition, because it is not minimalist. What if the font-color is the same font-color like the font-color of the unsaved tab in the editor? Yes, but in Preview there is nothing like "unsaved". So there should be different colors for a clear separation. So, what about if the font-color would be in green? Hey, that sounds good! A kind of soft green color. The green color reminds me of a traffic light when people are crossing the street. A color reminds me of children, because children like to play with colors. Colors reminds me also of a toy to play. Yes, and coding is playing. All those point of views make so much sense. So I have a good feeling for the green color as font-color when the Preview-tab is in focus. But maybe I will not like the effect.
Is there a possibility to change the font-color of the Preview-tab when it is in focus? If so, where can I change the settings?
Nevertheless I think that the idea of a green font-color is a good idea. The Preview-tab would have then, when it is in focus, some kind of smiling, warm and lovely character. Or what about this idea: When Preview-tab is in focus, then the font-color should be green by default, and at the same time giving the users the possibility in a script to change the font-color?
What about #46af41?
#46af41: I found this color today by pressing in the color spectrum in Gimp.
I tested the color in the tab of the editor for unsaved tab. I like it.
On one side there is the red color for the unsaved tab in the editor, and on the other side there would be the green color when Preview is in focus or when other tabs of the sidebar are in focus. It would be some kind of nice color game that fits together.
The text was updated successfully, but these errors were encountered: