• Login
Community
  • Login

Change colour of highlight in picklist

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 5 Posters 495 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.
  • D
    Dave Hope
    last edited by Dave Hope Feb 7, 2023, 11:40 AM Feb 7, 2023, 11:39 AM

    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

    A 1 Reply Last reply Feb 7, 2023, 12:28 PM Reply Quote 0
    • A
      Alan Kilborn @Dave Hope
      last edited by Feb 7, 2023, 12:28 PM

      @Dave-Hope

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

      D 1 Reply Last reply Feb 13, 2023, 4:24 PM Reply Quote 0
      • D
        Dave Hope @Alan Kilborn
        last edited by Feb 13, 2023, 4:24 PM

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

        P 1 Reply Last reply Feb 13, 2023, 6:12 PM Reply Quote 0
        • P
          PeterJones @Dave Hope
          last edited by PeterJones Feb 13, 2023, 6:13 PM Feb 13, 2023, 6:12 PM

          @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.

          M 1 Reply Last reply Feb 13, 2023, 6:31 PM Reply Quote 2
          • M
            Michael Vincent @PeterJones
            last edited by Feb 13, 2023, 6:31 PM

            @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.

            P 1 Reply Last reply Feb 13, 2023, 6:36 PM Reply Quote 3
            • P
              PeterJones @Michael Vincent
              last edited by Feb 13, 2023, 6:36 PM

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

              D 1 Reply Last reply Feb 16, 2023, 8:01 AM Reply Quote 2
              • D
                dinkumoil @PeterJones
                last edited by Feb 16, 2023, 8:01 AM

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

                M 1 Reply Last reply Feb 16, 2023, 1:44 PM Reply Quote 3
                • M
                  Michael Vincent @dinkumoil
                  last edited by Feb 16, 2023, 1:44 PM

                  @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
                  2 out of 8
                  • First post
                    2/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors