- This topic has 25 replies, 4 voices, and was last updated 10 years, 1 month ago by HeDiBo.
-
AuthorPosts
-
July 29, 2014 at 10:07 am #36241HeDiBoParticipant
I'll illustrate using the Alphaskins Demo program: the Edit Controls section:
[attachment=6826:ShowHighlight.jpg]
The sMaskEdit1 field has focus and all text is selected: it's in blue :wacko:
The highlight should be like the one shown in sTreeView1 on the right.
In general the standard blue color of the selection highlight is totally wrong for most skins, except for the blueish ones.
August 17, 2014 at 2:37 pm #52302SupportKeymasterI'm agree with you, but I have no idea how to change a color of system selection.
August 17, 2014 at 8:30 pm #52311HeDiBoParticipant'Support' wrote:I'm agree with you, but I have no idea how to change a color of system selection.
I'm going on a holiday for a few weeks. When I return, do you want me to research this subject?
August 18, 2014 at 6:34 am #52312SupportKeymasterI'm not sure that you can find a solution for a standard control..
August 18, 2014 at 6:56 am #52314CheshireCatParticipant'HeDiBo' wrote:In general the standard blue color of the selection highlight is totally wrong for most skins, except for the blueish ones.
The selection color for a edit is always COLOR_HIGHLIGHT / COLOR_HIGHLIGHTTEXT. You can changing the COLOR_HIGHLIGHT value using SetSysColors function, but this will change for all applications. No idea what Microsoft is thinking here …
August 18, 2014 at 8:07 am #52322SupportKeymaster'CheshireCat' wrote:The selection color for a edit is always COLOR_HIGHLIGHT / COLOR_HIGHLIGHTTEXT. You can changing the COLOR_HIGHLIGHT value using SetSysColors function, but this will change for all applications. No idea what Microsoft is thinking here …
Yes, color will be changed for all apps in this way.
August 18, 2014 at 9:06 am #52323CheshireCatParticipantI have just tested it with the Activate and Deactivate events, it works reasonably good, but is of course not an optimal solution.
[attachment=6865:EditSelectionColor.jpg]
Maybe my simple solution can be expanded 😉
Here the source code as a small example:
[attachment=6866:ChangeSysColors.zip]
September 7, 2014 at 1:08 pm #52432HeDiBoParticipant'CheshireCat' wrote:I have just tested it with the Activate and Deactivate events, it works reasonably good, but is of course not an optimal solution.
Maybe my simple solution can be expanded 😉
Well, it's already much better than what we have now. What do you think Serge?
September 7, 2014 at 3:05 pm #52436SupportKeymaster'HeDiBo' wrote:Well, it's already much better than what we have now. What do you think Serge?
Colors are changed in all applications in the system. You think, it's good?
September 7, 2014 at 3:20 pm #52440HeDiBoParticipant'Support' wrote:Colors are changed in all applications in the system. You think, it's good?
It's not very good. But restoring the old colors when the application is deactivated and setting them on activate does not harm much. It's not perfect, but better than it's now.
September 9, 2014 at 7:11 am #52448CheshireCatParticipantHello Dick,
when colors are changed in this way, the user of your software should be able to turn off this behavior, for example via a menu option 😉
September 9, 2014 at 10:11 am #52449HeDiBoParticipant'CheshireCat' wrote:when colors are changed in this way, the user of your software should be able to turn off this behavior, for example via a menu option 😉
I agree. There should be a property in TsSkinManager, since it's an application wide setting.
September 16, 2014 at 1:33 pm #52456HeDiBoParticipantI have modified the CheshireCat project to have a quick look at the effect with different skins.
I noticed a number of problems with some skins:
- The following skins have no contrast between highlighted text and highlighted background, making the text unreadable: DarkMetro, DarkMetro_contrast, MacOS2, Matrix, Matrix_contrast, Ubuntu, Underwater, Winter2003
- The next skins have no distinction between a normal background and a highlighted background making selection disappear: Emerald, Nautilus, Nautilus_contrast, Steam, Steam2,
- The Subway and Zest skins are flawed because they change the background color when the mouse hovers over it.
All these problems can be viewed in this project: [attachment=6886:CangeSysColor.zip]
September 16, 2014 at 3:43 pm #52460SupportKeymasterThank you. But, you see this global blinking when application is activated/deactivated?
What you think about that?
September 16, 2014 at 5:00 pm #52462HeDiBoParticipant'Support' wrote:Thank you. But, you see this global blinking when application is activated/deactivated?
What you think about that?
First of all: the skin problems are there regardless of the selection issue. The sample project is simply an easy way to show these skin problems.
I tried to run programs that would show this global change. And there were not many. I started a text editor and highlighted some text: that changed color, but not so much that it bothered me. You really had to look to see it. When I ran a heavy program (LibreOffice) I saw the blinking you referred to. I can understand that this is unacceptable.
I also tried to find out how selection was set up by Windows messages. That would be a starting point of customizing the selection color (make the system ignore the message and do it yourself). But I could not find such messages :huh:. I have no idea how a selection is painted. Maybe you have some idea about this?
September 27, 2014 at 9:22 am #48845SupportKeymasterI have found a way to hook the GetSysColor procedure, I hope it helps.
September 28, 2014 at 5:59 pm #52497HeDiBoParticipant'Support' wrote:I have found a way to hook the GetSysColor procedure, I hope it helps.
If you tell us what you found, maybe we can help you :cs:
September 29, 2014 at 12:27 am #52498molParticipantI guess Serge is using this:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd144927%28v=vs.85%29.aspx
-Uwe
September 29, 2014 at 5:01 am #52499SupportKeymasterNo, I'm using hooks for these functions (GetSysColor, GetSysCoorBrush and CreatePen), it's ready and in tests already.
Added the TsSkinManager.Options.ChangeSysColrs property.
Today evening or tomorrow I can give this new package for tests.
September 29, 2014 at 6:03 am #52511CheshireCatParticipant'Support' wrote:… it's ready and in tests already …
Added the TsSkinManager.Options.ChangeSysColrs property.
Today evening or tomorrow I can give this new package for tests.
Hello Serge,
great news :a3:
I have tried many ways in the last few weeks, but you're just faster 😉
-
AuthorPosts
- You must be logged in to reply to this topic.