Community
    • Login

    Change colour of highlight in picklist

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 5 Posters 493 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dave HopeD
      Dave Hope
      last edited by Dave Hope

      Hey, does anyone know how to change the colour of the highlighted line in a picklist? In the image below, “lil” is highlighted but it’s so close to the background colour, it’s not visible. I’ve been through the style config multiple times but can’t see which setting it might be. If I change the theme, the background and highlight change so it must be configurable? 🤷‍♂️

      ZPSeL4Q.png

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Dave Hope
        last edited by

        @Dave-Hope

        It might be helpful to know which theme you are using. And, BTW, unfortunately, themes aren’t well-maintained.

        Dave HopeD 1 Reply Last reply Reply Quote 0
        • Dave HopeD
          Dave Hope @Alan Kilborn
          last edited by

          Hey, @Alan-Kilborn 👋 Select theme says “Default (stylers.xml)” but I’m sure I used to be using Deep Black. If I switch to that, it looks (almost) identical but the font size is different.

          I’m just looking for the setting to change the style of the highlight if you happen to know which one it is? 😊

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Dave Hope
            last edited by PeterJones

            @Dave-Hope said in Change colour of highlight in picklist:

            Hey, @Alan-Kilborn 👋 Select theme says “Default (stylers.xml)” but I’m sure I used to be using Deep Black. If I switch to that, it looks (almost) identical but the font size is different.

            You are not using Default (stylers.xml) in that screenshot, unless you very much modified the default theme yourself. Are you sure that screenshot wasn’t from Deep Black or the DarkModeDefault?

            I’m just looking for the setting to change the style of the highlight if you happen to know which one it is? 😊

            It’s not as simple as that. Experimentally: If the main theme’s background is white, then the “picklist highlighted/active” is blue. If the main theme has a different color, then the “picklist hightlighted/active” matches the main background, and the inactive picklist items have a background that is a little darker or a little lighter than the theme background (“little” means it changes R,G, and B values by ~20 each, if possible, without going below 0 or above 255). The calculation is not user-configurable, as far as I know.

            I could have sworn there were issues reported about such things, but I couldn’t find them when I searched last week – maybe it was the panel background contrast, rather than the auto-completion picklist. But yes, I agree, with a dark background, the picklist contrast isn’t very helpful.

            Michael VincentM 1 Reply Last reply Reply Quote 2
            • Michael VincentM
              Michael Vincent @PeterJones
              last edited by

              @PeterJones said in Change colour of highlight in picklist:

              The calculation is not user-configurable, as far as I know.

              Correct, but it can be changed with a plugin (e.g., PythonScript):

              from Npp import editor, ELEMENT
              
              editor.setElementColour(ELEMENT.LIST_SELECTED_BACK, (0  , 64 , 255, 255))
              

              That is a blue color with alpha opaque - need the latest PS3 for the alpha bit, otherwise, just drop the last 255 from the tuple.

              Cheers.

              PeterJonesP 1 Reply Last reply Reply Quote 3
              • PeterJonesP
                PeterJones @Michael Vincent
                last edited by

                @Michael-Vincent said in Change colour of highlight in picklist:

                but it can be changed with a plugin

                I didn’t know that. Cool.

                @dinkumoil , can that be added to your ExtSettings plugin?

                dinkumoilD 1 Reply Last reply Reply Quote 2
                • dinkumoilD
                  dinkumoil @PeterJones
                  last edited by

                  @PeterJones said in Change colour of highlight in picklist:

                  can that be added to your ExtSettings plugin?

                  I have put it on my todo list.

                  @Michael-Vincent

                  Do you know the version of Scintilla (or rather the version of Notepad++) that introduced this feature?

                  Michael VincentM 1 Reply Last reply Reply Quote 3
                  • Michael VincentM
                    Michael Vincent @dinkumoil
                    last edited by

                    @dinkumoil said in Change colour of highlight in picklist:

                    @Michael-Vincent
                    Do you know the version of Scintilla (or rather the version of Notepad++) that introduced this feature?

                    Looking at https://www.scintilla.org/ScintillaHistory.html, it seems version 5.0.1:

                    Add SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements. Implement SC_ELEMENT_LIST* to change colours of autocompletion lists.

                    which methinks corresponds to Notepad++ 8.4:

                    https://notepad-plus-plus.org/downloads/v8.4/

                    Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5. (Fix #10504)

                    Cheers.

                    1 Reply Last reply Reply Quote 4
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors