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

when sidebar is in focus: visible effect of the tab #6

Closed
ralf3u opened this issue Oct 7, 2021 · 87 comments
Closed

when sidebar is in focus: visible effect of the tab #6

ralf3u opened this issue Oct 7, 2021 · 87 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@ralf3u
Copy link

ralf3u commented Oct 7, 2021

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.

@xiota
Copy link
Owner

xiota commented Oct 7, 2021

@ralf3u

I lost the orientation when working with shortcuts in Geany because I didn't know which pane is now in focus: editor or sidebar.
What is in focus? Is it the editor or Preview? There is no hint at all.

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 ~/.config/geany/colorschemes. Look for the line that says something like current_line=#000;#363f41;true.

Is there a possibility to change the font-color of the Preview-tab when it is in focus?
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.

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.

If so, where can I change the settings?

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.

@xiota xiota added the enhancement New feature or request label Oct 7, 2021
@ralf3u
Copy link
Author

ralf3u commented Oct 8, 2021

@xiota

The editor highlights the current line. If no line is highlighted, the editor does not have focus.

That is not true. Here is the evidence:
Let's imagine this situation: The highlighted line is on top of the document. With the mouse the user is scrolling down, so that the highlighted 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.

You write:

The problem is I'm not able to connect to any signals to find out when the Preview tab gets and loses focus.

So, to detect when tab gets and loses focus does exist only for the editor and not for the sidebar?


Thank you for an answer in advance.

@xiota
Copy link
Owner

xiota commented Oct 9, 2021

The editor highlights the current line. If no line is highlighted, the editor does not have focus.

That is not true... With the mouse the user is scrolling down, so that the highlighted line is not any more in the visible area... There is no hint at all.

Okay.

So, to detect when tab gets and loses focus does exist only for the editor and not for the sidebar?

  1. The editor is a different component. (scintilla)
  2. I can test for focus, but that is not useful if it is not done at the right time.
  3. Something could be blocking the signals for the sidebar.

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.

@xiota
Copy link
Owner

xiota commented Oct 9, 2021

@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: preview_tab_focus_green, preview_tab_focus_bold. They are disabled by default, so you will have to enable them.

By now you know the routine... reset config, save config, edit config, reload config... etc.

@xiota xiota closed this as completed Oct 9, 2021
@ralf3u
Copy link
Author

ralf3u commented Oct 9, 2021

@xiota

Yes!! It's nearly perfect.

issue 1
I don't like so much the green color. It seems to be that you took an other green color. In the colorscheme sleepy pastel Lubuntu dark-mode (what is possible with Kvantum) the green color is a little bit too dark for me. Is there a possibility to choose an other green color like the color I mentioned above (#46af41)?
I know how to change the color of the tab-title for an unsaved document, but I don't know to change the color of the tab-title of the sidebar.

issue 2
But what about the other tabs of the sidebar, like Documents or Symbols? I mean, this is for me not so important. But it would be good if it would work on all tabs of the sidebar for the reason to deliver a consequent behavior.

Thank you for an answer in advance.

@xiota
Copy link
Owner

xiota commented Oct 9, 2021

But what about the other tabs of the sidebar, like Documents or Symbols?

I'll take a look. I'm probably going to move this feature to a different plugin.

I don't like so much the green color.

I'll make it customizable later.

@ralf3u
Copy link
Author

ralf3u commented Oct 10, 2021

@xiota

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.

@xiota
Copy link
Owner

xiota commented Oct 10, 2021

@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 geany-plugin-xi-tweaks. You can install with:

sudo apt-get update
sudo apt-get install geany-plugin-xi-tweaks

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.

@ralf3u
Copy link
Author

ralf3u commented Oct 10, 2021

@xiota

Wow!! From the effect level it is marvelous!!
It makes fun to tab-browse!! What a feeling!!


issue 1
I don't know if that happened in other versions of Geany Preview and I don't know if it has to do something with this new feature, but now I recognize this:
On a very long document, so that I can see in the editor only a part of the document in the visible area, there is this when I go to the last line of the document after some seconds:
In the sidebar, in the Preview-tab, there is at the very first line some strange text that is marked, like: "shorcut stays down".


issue 2
open Geany
press the shortcut toggle editor/sidebar
press again the shortcut toggle editor/sidebar
result: the green color stays in the sidebar


issue 3
open Geany
condition 1: the editor is on the left side; the sidebar is on the right side
condition 2: the Symbols-tab is in the sidebar the first tab
click on the Preview-tab
close Geany
open Geany
press the shortcut toggle editor/sidebar
in the sidebar: tab-browse with shortcuts to the left, to the first tab of the sidebar, so to the Symbols-tab
in the sidebar: continue to tab-browse with shortcuts to the left
result: a tab of the editor is in focus
expected result: the last tab on the right side of the sidebar should be in focus


remark: behavior that I like:
open Geany
click in the sidebar on a tab that is not the Preview-tab
close Geany
open Geany
press the shortcut toggle editor/sidebar
result: Preview-tab is in focus (that's good!)

@xiota
Copy link
Owner

xiota commented Oct 10, 2021

press the shortcut toggle editor/sidebar
press again the shortcut toggle editor/sidebar
result: the green color stays in the sidebar

Should be fixed. New version will be in the PPA when it's done building.

Will address other issues in the other thread.

@xiota xiota added the wontfix This will not be worked on label Oct 11, 2021
@xiota
Copy link
Owner

xiota commented Oct 11, 2021

Implemented in another plugin: https://github.com/xiota/geany-tweaks

@ralf3u
Copy link
Author

ralf3u commented Oct 24, 2021

@xiota

issue 1
I don't know if that happened in other versions of Geany Preview and I don't know if it has to do something with this new feature, but now I recognize this:
On a very long document, so that I can see in the editor only a part of the document in the visible area, there is this when I go to the last line of the document after some seconds:
In the sidebar, in the Preview-tab, there is at the very first line some strange text that is marked, like: "shorcut stays down".

Today I can't reproduce the issue 1 any more, so it is fixed.


issue 2
open Geany
press the shortcut toggle editor/sidebar
press again the shortcut toggle editor/sidebar
result: the green color stays in the sidebar

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
open Geany
condition 1: the editor is on the left side; the sidebar is on the right side
condition 2: the Symbols-tab is in the sidebar the first tab
click on the Preview-tab
close Geany
open Geany
press the shortcut toggle editor/sidebar
in the sidebar: tab-browse with shortcuts to the left, to the first tab of the sidebar, so to the Symbols-tab
in the sidebar: continue to tab-browse with shortcuts to the left
result: a tab of the editor is in focus
expected result: the last tab on the right side of the sidebar should be in focus

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.

@xiota
Copy link
Owner

xiota commented Oct 24, 2021

It is green when it should not be green, and vice versa.

This feature is difficult to get working right. I'll have to look at it some more later.

@ralf3u
Copy link
Author

ralf3u commented Oct 25, 2021

issue 3
I don't know how to program a software, but maybe those thoughts could help to find a solution. The problem is the shortcut toggle editor/sidebar. So, the shortcut toggle editor/sidebar should do exactly the same like a click on a tab of the sidebar or a click in the content of the sidebar. So, when shortcut toggle editor/sidebar is pressed:

IF the editor is in focus
THEN DO exactly the same like a click on a tab of the sidebar or a click in the content of the sidebar

@xiota
Copy link
Owner

xiota commented Oct 26, 2021

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.

@ralf3u
Copy link
Author

ralf3u commented Oct 29, 2021

@xiota The issue 2 is solved. But issue 3 is not fixed.

@xiota
Copy link
Owner

xiota commented Oct 29, 2021

I don't know what "issue 3" is. Please describe what happens and the steps to reproduce.

@ralf3u
Copy link
Author

ralf3u commented Oct 29, 2021

I don't know what "issue 3" is. Please describe what happens and the steps to reproduce.

#6

@xiota
Copy link
Owner

xiota commented Oct 29, 2021

Thanks. I'll take a look at it. Looks like more problems with signals.

@xiota
Copy link
Owner

xiota commented Oct 31, 2021

PPA has been updated with another attempt.

@ralf3u
Copy link
Author

ralf3u commented Nov 1, 2021

PPA has been updated with another attempt.

The issue 3 of this webpage is fixed.

issue 4
But now the problem is, that there are some small points around the Preview-tab-title when it is in focus. During tab-browsing in the sidebar, there are some small points around the corresponding focused tab-title. Some days ago there were no points at all. I think that the points are standing for focus. I feel a little bit disturbed by the points.

possible solution
The focus should not be on the tab-title but on the content of the tab.

model for a possible solution
In the editor there are no points at all around the tab-title when a tab of the editor is in focus.

control after the solution was realized
a: There should be no points for all tab-title of the sidebar, when a tab of the sidebar is in focus.
b: There should be no points for all tab-title of the sidebar, when switching with shortcut (toggle editor/sidebar) or by clicking on a tab-title of the sidebar.

@xiota
Copy link
Owner

xiota commented Nov 1, 2021

But now the problem is, that there are some small points around the Preview-tab-title when it is in focus.

I don't know what you are describing. Please show a screenshot.

The focus should not be on the tab-title but on the content of the tab.

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.

@ralf3u
Copy link
Author

ralf3u commented Nov 1, 2021

I don't know what you are describing. Please show a screenshot.

2021-11-01

There are now small white points around the tab-title Preview.

@xiota
Copy link
Owner

xiota commented Nov 1, 2021

There are now small white points around the tab-title Preview.

That does not happen on my computer. What theme are you using?

Try adding: border-style: none;

@ralf3u
Copy link
Author

ralf3u commented Nov 1, 2021

What theme are you using?

Still the same theme:
My theme Qt-style is kvantum-dark.
GTK 2-Theme: Arc-Dark
GTK 3-Theme: Arc-Dark
my window theme (in openbox): KvGnomeDark
in Geany: colorscheme: Sleepy Pastel

Try adding: border-style: none;

Where?

@xiota
Copy link
Owner

xiota commented Nov 1, 2021

I don't know what package the Arc themes are from, so cannot install them to test.

Try adding: border-style: none;

Where?

To geany.css, inside the #geany-xitweaks-sidebar-tab-focus rule.

@ralf3u
Copy link
Author

ralf3u commented Nov 1, 2021

To geany.css, inside the #geany-xitweaks-sidebar-tab-focus rule.

After restarting Geany it is still there.

Help: Two days ago it was not there, so something was added yesterday.

@xiota
Copy link
Owner

xiota commented Oct 9, 2022

Could the focus-part be copied and pasted in other shortcuts (like xiota/geany-preview#37, xiota/geany-preview#38 and xiota/geany-preview#40)?

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.

@ralf3u
Copy link
Author

ralf3u commented Oct 9, 2022

Not exactly copy/paste, but they're doable.

Oh, that would be great! Then all keyboard navigation would work perfect!

I just think it's outside the scope of the Preview plugin.

I don't think so, because scrolling right away in the Preview with the keyboard (with the arrow-keys) is not an unusual behavior.

@xiota
Copy link
Owner

xiota commented Oct 9, 2022

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?

@ralf3u
Copy link
Author

ralf3u commented Oct 9, 2022

I believe xiota/geany-preview#40 is already implemented in Xi/Tweaks.

I use Xi/Tweaks only for the colored tab-title of the sidebar. See detailed manual of installation and configuration in #6.

Are you still using that plugin?

Not at the moment because I reinstalled Lubuntu. But I will use it in the next hours.

@ralf3u
Copy link
Author

ralf3u commented Oct 9, 2022

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 Focus there is the entry Switch to Sidebar. I have no idea how to program software, but if one could know how the shortcut works, then I can imagine that one could copy & paste the code.

@ralf3u
Copy link
Author

ralf3u commented Oct 9, 2022

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 geany.css that is located in ~/.config/geany/ (if geany.css does not exist there, then first do this: copy /usr/share/geany/geany.css to ~/.config/geany/geany.css):

notebook header tabs > * {
	outline-width: 0;
}

#geany-xitweaks-sidebar-tab-focus {
	font-weight: normal;
	color: #7dcc95;
}
#geany-xitweaks-sidebar-tab-unfocus {
	/* Whatever you want */
}

#geany-xitweaks-sidebar-page-focus {
	border-width: 3px;
	border-style: solid;
	border-color: #2e3436;
}

#geany-xitweaks-sidebar-page-unfocus {
	border-width: 3px;
	border-style: solid;
	border-color: transparent;
	background: #2e3436;
}

#geany-preview-sidebar-page {
	border-width: 3px;
	border-style: solid;
	border-color: transparent;
	background: #2e3436;
}

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:

  • activate in the Plugin-Manager the plugin Xi/Tweaks; if Xi/Tweaks is not in the list, then you need first to install it through terminal: sudo apt install geany-plugin-xi-tweaks
  • in .config/geany/plugins/xitweaks change in xitweaks.conf sidebar_focus_enabled=false to sidebar_focus_enabled=true; then save the document xitweaks.conf, and then close the document; go to menu-bar Edit, Plugin-Preferences, Xi/Tweaks and click on Reload Config, Apply and OK; restart Geany and verify in xitweaks.confif sidebar_focus_enabled=true

The reason for the code notebook header tabs > * {outline-width: 0;} is to avoid this behavior: If the shortcut "Toggle focus between the editor and preview" was pressed, then, as long as Geany is not closed, there are white points around the tab-title on a long click on an open tab of the editor or sidebar.

If the content of geany.css (that is located in ~/.config/geany/) will be changed, then save the document, and restart Geany to see the changes.

@ralf3u
Copy link
Author

ralf3u commented Oct 10, 2022

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 Focus there is the entry Switch to Sidebar. I have no idea how to program software, but if one could know how the shortcut works, then I can imagine that one could copy & paste the code.

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.

@ralf3u
Copy link
Author

ralf3u commented Oct 10, 2022

I have a question to your comment geany/geany#3289 (comment). You write:

The problem is not just knowing whether a widget has focus, but also setting focus on the widget of interest.

Specially this part of the sentence is for me interesting:

[..] but also setting focus on the widget of interest.

This is for me strange. Because you write in #6:

Not exactly copy/paste, but they're doable.

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:

The problem is [...] knowing whether a widget has focus [...]

Or I would write it like this to solve #6 and xiota/geany-preview#15:
The problem is if sidebar has focus.

Is this correct?

@xiota
Copy link
Owner

xiota commented Oct 10, 2022

The solution is to switch focus to the content area of the Preview-tab.

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.

@ralf3u
Copy link
Author

ralf3u commented Oct 10, 2022

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.
Is it not possible to say: IF tab-title is green THEN run function A?

@ralf3u
Copy link
Author

ralf3u commented Oct 20, 2022

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 Toggle focus between editor and sidebar is pressed during the editor is in focus, then for me it seems to be that three functions are executed:

function A: put in the sidebar the Preview-tab in foreground
function B: make the tab-title green
function C: put the content-area of the tab in focus

The shortcut Toggle focus between editor and sidebar works absolutely perfect. There is no issue at all with that shortcut.

You write in #6:

Focus switches to the sidebar, but I have no control over which specific widget has focus.

But it does work perfect for the shortcut Toggle focus between editor and sidebar.
So, the question is: Why functions from above can not be copied and pasted to solve #6 and xiota/geany-preview#15?

#6
If I click in the content-area of the sidebar, then the content-area of the sidebar is in focus. I'm sure that there is a signal for it, like https://docs.gtk.org/gtk3/signal.Notebook.focus-tab.html. Is there not a possibility to code this:
IF sidebar has focus, THEN run function B.

xiota/geany-preview#15
If I click on the tab-title, then the sidebar is in focus. I'm sure that there is a signal for it, like https://docs.gtk.org/gtk3/signal.Notebook.focus-tab.html. Is there not a possibility to code this:
IF sidebar has focus, THEN run function C.

@ralf3u
Copy link
Author

ralf3u commented May 18, 2023

#6:

I also wrote and submitted a patch for geany to add the toggle focus features, but closed it because of lack of upstream interest (unlikely it would ever be accepted).

For reasons of documentation:
Could you please mention the link to the patch or rather the issue number?

@xiota
Copy link
Owner

xiota commented May 18, 2023

Maybe geany/geany pulls/2919

@ralf3u
Copy link
Author

ralf3u commented Mar 21, 2024

On this #6 there is this text:

Old issue, still not fixed:
clicking in the sidebar in the content of a tab: tab-title should be green

Thanks to the plugin Xi/Tweaks this is issue is completely fixed for the Preview-tab, but not for the Files-tab (plugin File Browser) of the sidebar.

Steps to reproduce

  1. click on the tab-title of the Files-tab
  2. click on the tab-title of the editor
  3. click in the content area of the Files-tab (result: the content area of the Files-tab is in focus)

Result
the tab-title Files-tab does not show a sign that it has focus

Result
the tab-title Files-tab should be underlined because the tab is in focus

@ralf3u
Copy link
Author

ralf3u commented Mar 21, 2024

There is also an other issue in Lubuntu 23.10 in Geany 1.38 when using the plugin "File Browser":

Steps to reproduce

  1. click on the tab-title of the Files-tab
  2. click in the content area of the Files-tab (result: the content area of the Files-tab is in focus)

Result
the tab-title Files-tab does not show a sign any more that it has focus

Result
the tab-title Files-tab should be underlined because the tab is in focus

@ralf3u
Copy link
Author

ralf3u commented Mar 21, 2024

And there is a last issue in Lubuntu 23.10 in Geany 1.38 when using the plugin "File Browser":

Steps to reproduce

  1. click on the tab-title of the Files-tab
  2. click in the content area of the Files-tab (result: the content area of the Files-tab is in focus)
  3. tab-browse with the keyboard (ctrl+Pageup/Pagedown) forward and backward

Result
the tab-title Files-tab does not show a sign that it has focus

Result
the tab-title Files-tab should be underlined because the tab is in focus

@ralf3u
Copy link
Author

ralf3u commented Mar 21, 2024

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.

@ralf3u
Copy link
Author

ralf3u commented Mar 21, 2024

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

@ralf3u
Copy link
Author

ralf3u commented Mar 24, 2024

The title of this issue is fixed thanks to the plugin Xi/Tweaks.

For reasons of documentation here are the settings that work:

  1. Content of xitweaks.conf that is located at .config/geany/plugins/xitweaks/:
[tweaks]
sidebar_focus_enabled=false
notebook_focus_enabled=true
  1. At the end of geany.css that is located in .config/geany/:
/* design of the tab-title of active tabs (so, one tab of the editor, one tab of the sidebar and one tab of the message window) */
tab:checked {
	font-weight: bold;
}

/* design of the tab-title of the tab that is in focus */
#geany-xitweaks-notebook-tab-focus,
#geany-xitweaks-notebook-tab-focus label {
	border-bottom: 5px solid black;
}

/* design of the tab-title of the tabs that are not in focus */
#geany-xitweaks-notebook-tab-unfocus,
#geany-xitweaks-notebook-tab-unfocus label {
	border-bottom: 5px solid transparent;
}

@ralf3u ralf3u closed this as completed Mar 24, 2024
@ralf3u
Copy link
Author

ralf3u commented Mar 24, 2024

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:

  1. Content of xitweaks.conf that is located at .config/geany/plugins/xitweaks/:
[tweaks]
sidebar_focus_enabled=true
notebook_focus_enabled=false
  1. At the end of geany.css that is located in .config/geany/:
/* design of the tab-title of the tab that is in focus in the sidebar */
#geany-xitweaks-notebook-tab-focus,
#geany-xitweaks-notebook-tab-focus label {
	color: lightgreen;
}

/* design of the tab-title of the tabs that are not in focus in the sidebar */
#geany-xitweaks-notebook-tab-unfocus,
#geany-xitweaks-notebook-tab-unfocus label {
	color: black;
}

@ralf3u
Copy link
Author

ralf3u commented Mar 24, 2024

Could you please delete the two labels "enhancement" and "wontfix" because the issue is fixed?

@ralf3u
Copy link
Author

ralf3u commented Mar 25, 2024

Remark to the plugin Xi/Tweaks
I would put only those lines in the document xitweaks.conf:

[tweaks]
sidebar_focus_enabled=false
notebook_focus_enabled=false

And then I would put a description in a readme.txt that is located in the same folder where the document xitweaks.conf is stored. The advantage is that the CSS-text can be copied easily.

@xiota xiota transferred this issue from xiota/geany-preview Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants