-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Added feature: we can set colour for individual tabs #12098
Conversation
Answer for asked question:
I'm also wondering if there should be an overwrite option for |
Yes, like styles 1 - 5 are available there; it would be a disappointment to users to not be able to customize
Yes, with color samples, like styling: Also, in a submenu (again like styling) would be appreciated. |
Thank you for your work. 👍 Would it be possible to apply the selected color to the active tab? |
Wouldn't it be better served to only change the color of the narrow strip of colour in the top of the active tab to the colour user just selected? |
We agree that when the user is selecting a color, they should see some effect before switching tabs. And I certainly see your point. Wouldn't the upper strip suffice to make the active tab stand out? As you and the others understand. :) |
Well, I haven't actually seen it, but to me that doesn't sound confusing.
Not sure at all what this means, in the context of the recent conversation. |
In response to your previous comment:
|
I suppose if the upper colour strip is really garish it would help it stand out. But I wouldn't necessarily want the tab coloring that garish on other tabs of the same color. |
Ok, So I've added colourization of active bar highlight and in dark mode (default grey) it look awesome. But I'm not so sure about light ones (default theme, and with darkened inactive tabs). I'm also not sure about adding "Set colour" item to the document context menu since those should be related only to document itself. I would much more prefer to add it to the Tab context menu but the way it's implement right now I'm not able to add sub-menus there. For now I think it's best to leave it in View/Tab/Colour. |
Correct. Don't do it.
That could be a later change. |
I tried it out in dark mode (black) and the effect is OK: For the other dark modes (red, green, blue, etc), sometimes the effect seems better than others. In non-dark mode it is less striking (as noted by @spaxio): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Move the 3rd level menu items to the 2nd level, and rename the label for the future customization.
- Add these menu items also on the context menu of tab.
- Add Color square to the menu items (as Style token).
- If possible, the focused (the current selected) tab has the assigned colour on top bar, if it is activated.
The customization of colour is out of scope and will be in an another PR
BTW, I notice this PR is not from a new branch:
It's OK for the first time because there will no impact to the workflow of merging this PR. Please follow the suggestion for your next PR. |
All points have been addressed. 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the localization bug with the suggested solution.
Maybe for another PR, but it would be nice to have these colors also for items in the Document List panel. |
With the addition of six items to the tab context menu, the menu seems to be getting to an almost obnoxious vertical size: Shouldn't the new items be at the bottom? Users may complain that to "move to another instance" they now have to move the mouse a huge amount to reach it. Of course, users always complain... :-) I'm not sure if there is a "typical" size monitor that Notepad++ (maximized) is targeting. In days of old, it might have been 1024 x 768... Not sure about now. But the point is, perhaps the tab context menu is getting dangerously close to appearing from top-screen-edge to bottom-screen-edge, and possibly even with the dreaded ▲ at the top and ▼ at the bottom. Is it time to bite the bullet and do some submenus here? There are obvious groupings (these "colours", the "close all..."s, the "opens", the "clipboards"). @donho Would this be considered? Should I make an issue? |
Sounds like a new issue. :-) |
I agree, I would remove those. Features discovery will suffer but we can add those when submenu gets implemented. Or make it dependent on a flag in settings (in the future) |
It's shame to remove this feature from the tab context menu, that will make tab coloring meaningless. How about the following new tab context menu?
Close More contains :
Open contains:
Clipboard contains:
Document to contains:
Apply Color contains:
If you guys think the idea of another simpler context menu is OK, then I will implement it in another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the typo and the variable naming.
static constexpr IndividualTabColours individualTabHuesFor_DarkCyna { { HLSColour{0, 60, 60}, HLSColour{70, 60, 60}, HLSColour{144, 70, 60}, HLSColour{13, 60, 60}, HLSColour{195, 60, 60} } }; | ||
static constexpr IndividualTabColours individualTabHuesFor_DarkOlive { { HLSColour{0, 60, 60}, HLSColour{70, 60, 60}, HLSColour{144, 60, 60}, HLSColour{13, 60, 60}, HLSColour{195, 60, 60} } }; | ||
|
||
static const IndividualTabColours individualTabHues { { HLSColour{0, 210, 150}, HLSColour{70, 210, 150}, HLSColour{144, 210, 150}, HLSColour{13, 210, 150}, HLSColour{195, 210, 150} } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that individualTabHues
(light theme) and all other 7 IndividualTabColours individualTabHuesFor_DarkXXX
arrays contains different 5 colour values.
It will be a major problem in the future if we want to make these 5 colours customizable.
Is it possible to have a function in which we pass a RGB value, and choice (light, dark, darkRed, darkBlue...) then the function in question return the RGB we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that this is just implementation detail and what we are exposing is RGB COLORREF getIndividualTabColour(...)
So if in the future we want to add colour customization we only have to add a case for if(g_colorToneChoice == customizedTone)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have a function in which we pass a RGB value, and choice (light, dark, darkRed, darkBlue...) then the function in question return the RGB we need?
And yes we can transform RGB into just a Hue and modify it according to theming rules back to RGB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
I see, I did not know about main menu, I rarely use it. I've used term "Close Multiple Tabs" to make it more familiar to users, as internet browsers are using it. |
What value are the SEPARATORS in @donho's #12098 (comment) ? They just make a user have to move the mouse further to get where they are going. OK, maybe the one after Really there SHOULD be a separator between "Clear Readonly Flag" and "Copy to Clipboard 🢒" but even better than that would be putting "Read Only" and "Clear RO Flag" into a "Readonly 🢒" submenu. "Open into 🢒" seems a bit obscure for opening Explorer, is there anything wrong with "Open Containing Folder 🢒" which is really obvious? Summary of all my suggestions in this post:
|
The 1st part is about file operation which corresponds to the main menu "File" (Close, Save, Open, Delete, Print...). |
I'm very dubious of that, but as you like. |
It'll be harder to do in my opinion (I have no idea how to implement it anyway). |
Hmm... Finally Close Multiple Tabs makes more sense than Close More . |
@donho said:
If you are making these sorts of changes, consider removing the word "All" from each of the "Close Multiple Tabs" items. It is awkward because "all" suggests, well, everything. It is a strong word in a native English speaker's mind. Better would be:
The use of "unchanged" introduces another term to Notepad++ users; why not just use "saved" as "save" is extremely solid in a user's mind? This would bring commonality with current naming trends that browser's use and users would be more familiar with; example from Chrome: Also, maybe this is another opportunity to promote #12072 as a really good idea. :-) |
English is not my native language, but I just checked MS Studio, it uses also "Close All But this". |
The Close commands are used frequently, and I'd highly recommend not to place them in a sub-menu. |
In direct opposition to that assertion, I find that I think with the possibility of some name tweaking, that the "close" options are perfectly situated. |
You can disagree, and I respect your opinion. |
Confused. Please tell me where in my response I was rude. |
I respect and appreciate you. Let's move on. :) |
Just check the firefox's tab context menu - the sub-menus are still there. |
Yes, Firefox did not revert that change.
👍 If you think it's worth the extra work and code. :) 👍 |
Personally, I would love this; having |
Fixes: #2271
This pull request implements a feature where we can select a colour for an individual tab.
We can choose up to 5 hues (red/green/blue/orange/purple) in View/Tab/Color menu.
Colours are saved in session.xml as integer, where -1 (or no value at all) means no colouring.
I've selected 5 because in my opinion, anything more would get more confusing with lots of tabs.
This is how it looks like:
It works in vertical mode too.
The colour is not retained when we try to pull a tab into a separate window.
Things worth discussing