Why is the highlight of a selection always blue?

Viewing 20 posts - 1 through 20 (of 25 total)
  • Author
    Posts
  • #52302
    Support
    Keymaster

      I'm agree with you, but I have no idea how to change a color of system selection.

      #52311
      HeDiBo
      Participant
        '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?

        #52312
        Support
        Keymaster

          I'm not sure that you can find a solution for a standard control..

          #52314
          CheshireCat
          Participant
            '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 …

            #52322
            Support
            Keymaster
              '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.

              #52323
              CheshireCat
              Participant

                I 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]

                #52432
                HeDiBo
                Participant
                  '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?

                  #52436
                  Support
                  Keymaster
                    '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?

                    #52440
                    HeDiBo
                    Participant
                      '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.

                      #52448
                      CheshireCat
                      Participant

                        Hello 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 😉

                        #52449
                        HeDiBo
                        Participant
                          '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.

                          #52456
                          HeDiBo
                          Participant

                            I 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]

                            #52460
                            Support
                            Keymaster

                              Thank you. But, you see this global blinking when application is activated/deactivated?

                              What you think about that?

                              #52462
                              HeDiBo
                              Participant
                                '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?

                                #48845
                                Support
                                Keymaster

                                  I have found a way to hook the GetSysColor procedure, I hope it helps.

                                  #52497
                                  HeDiBo
                                  Participant
                                    '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:

                                    #52498
                                    mol
                                    Participant
                                      #52499
                                      Support
                                      Keymaster

                                        No, 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.

                                        #52511
                                        CheshireCat
                                        Participant
                                          '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 😉

                                          #52512
                                          HeDiBo
                                          Participant
                                            'Support' wrote:

                                            No, 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.

                                            That's fantastic news :i-m_so_happy:

                                          Viewing 20 posts - 1 through 20 (of 25 total)
                                          • You must be logged in to reply to this topic.