Community
    • Login

    [New Plugin] ExtSettings

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    56 Posts 12 Posters 10.4k 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.
    • tomasz1986T
      tomasz1986
      last edited by

      I also very much like being able to modify the match highlighting colours separately, so that it is possible to only have the border visible with no background colour, like below.

      I am not allowed to edit the post above any more, so I just want to clarify that I meant the colour filling settings, and not some kind of multiple colours.

      In relation to this, I also have a question - is it possible to have this kind of highlighting customisation for the ordinary text selection too, or is it limited to the smart highlighting only?

      dinkumoilD 1 Reply Last reply Reply Quote 0
      • dinkumoilD
        dinkumoil @tomasz1986
        last edited by dinkumoil

        @tomasz1986 said in [New Plugin] ExtSettings:

        is it possible to have this kind of highlighting customisation for the ordinary text selection too

        You can configure the background color of selected text in the style configurator.

        Go to (menu) Settings -> Style Configurator -> (list box) Style -> Selected text colour -> (group box) Colour Style -> Background colour.

        Click on the colored panel to open a color selection dialog.

        With my plugin you can set the alpha value for selected text.

        @all
        To provide the same configuration options for selected text as for match highlighting I have to know how highlighting of selected text is implemented internally. Is it a certain indicator like match highlighting (its number is 29, thanks to @Ekopalypse who pointed that out somewhere)?

        EkopalypseE 1 Reply Last reply Reply Quote 4
        • EkopalypseE
          Ekopalypse @dinkumoil
          last edited by

          @dinkumoil

          selected text is handled internally by scintilla with SCI_SETSELFORE and SCI_SETSELBACK

          1 Reply Last reply Reply Quote 1
          • EkopalypseE
            Ekopalypse
            last edited by

            @dinkumoil - btw. there is no SCI_GET… equivalent of those calls, so if it is
            needed to store the default value in case of resets then you have to read the
            config.xml to get the current used styler.xml/theme.xml and read the value from there. :-(

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

              @Ekopalypse
              Thank you for providing these information.

              @tomasz1986
              As you can see it is only possible to set the character color and the background color of selected text. No fancy boxes with filling and borders, sorry.

              1 Reply Last reply Reply Quote 1
              • tomasz1986T
                tomasz1986
                last edited by tomasz1986

                @dinkumoil said in [New Plugin] ExtSettings:

                As you can see it is only possible to set the character color and the background color of selected text. No fancy boxes with filling and borders, sorry.

                No problem. Thank you for investigating.

                You mentioned the “character color”, but Notepad++ ignores the fgColor value for “Current line background colour”, so as far as I understand, it is only possible to modify bgColor of selected text. Your plugin, in addition, allows to modify the transparency, which is then applied to both the background and the text.

                Is this correct?

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

                  @tomasz1986 said:

                  as I understand, it is only possible to modify bgColor of selected text

                  That’s true, technically it is possible to set a background and a character color but Notepad++ doesn’t support the latter one.

                  Notepad++ ignores the fgColor value for “Current line background colour”

                  Why do you think so? Style configurator provides an option to configure that setting.

                  Your plugin … allows to modify the transparency, which is then applied to both the background and the text.

                  No. The alpha value for selections which my plugin can set only changes the opacity of the background color, i.e. the selection color.

                  tomasz1986T 1 Reply Last reply Reply Quote 1
                  • EkopalypseE
                    Ekopalypse
                    last edited by

                    @dinkumoil

                    a new scintilla feature is showing dots next to a folded line
                    Maybe worth including to your plugin?

                    b173d6f6-c414-4967-b0ff-64fb427d6a33-image.png

                    dinkumoilD 1 Reply Last reply Reply Quote 4
                    • tomasz1986T
                      tomasz1986 @dinkumoil
                      last edited by

                      @dinkumoil said in [New Plugin] ExtSettings:

                      @tomasz1986 said:

                      as I understand, it is only possible to modify bgColor of selected text

                      That’s true, technically it is possible to set a background and a character color but Notepad++ doesn’t support the latter one.

                      Notepad++ ignores the fgColor value for “Current line background colour”

                      Why do you think so? Style configurator provides an option to configure that setting.

                      Are these two sentences not contradicting? The setting is indeed there, but the selected text colour does not change, no matter what colour is specified there. Only the background colour changes.

                      On the topic: https://community.notepad-plus-plus.org/topic/12578/can-t-change-foreground-color-of-selected-text

                      I hope that we are talking about the same thing here. I use “fgColor” to mean the text/font colour, and “bgColor” to mean the background colour, as this is how they are used in the themes xml files.

                      dinkumoilD 1 Reply Last reply Reply Quote 0
                      • tomasz1986T
                        tomasz1986
                        last edited by

                        On the other hand, enforcing the text colour with external scripts (as explained in the other thread linked above) overwrites all syntax highlighting in the selected field of text, so it can become problematic very quickly, and I am not really sure if this is really worth it. That is why I myself would prefer a box style selection :). Since you said that it was not possible, it is probably better to leave the issue as it is, and focus on more important things. I have managed to get the job done with the standard text selection fine enough.

                        EkopalypseE 1 Reply Last reply Reply Quote 0
                        • dinkumoilD
                          dinkumoil @Ekopalypse
                          last edited by

                          @Ekopalypse said in [New Plugin] ExtSettings:

                          Maybe worth including to your plugin?

                          Indeed, I think it is. I will put it on my list.

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

                            @tomasz1986 said in [New Plugin] ExtSettings:

                            Are these two sentences not contradicting?

                            I hope that we are talking about the same thing here. I use “fgColor” to mean the text/font colour, and “bgColor” to mean the background colour

                            Sorry, I’ve messed up things. To be clear I should thoroughly define what I’m talking about.

                            Selection highlighting

                            Technically it is possible to set a background and a character color for selection highlighting but Notepad++ doesn’t support the latter one, respectively it ignores the according setting that may be available in whatever config file.

                            Current line highlighting

                            As in Style Configurator the setting is named “Current line background colour”, it is only possible to configure the background color of the current line highlighting. Notepad++ doesn’t support configuring the character color, respectively it ignores the according setting that may be available in whatever config file. I don’t know if there is a Scintilla setting that would allow to set the character color of the current highlighted line. I don’t know as well how current line highlighting is implemented internally. Maybe @Ekopalypse can provide this information?


                            enforcing the text colour with external scripts … overwrites all syntax highlighting in the selected field of text

                            Yes, thats the reason why I’ve never thought about changing text colors of selection or current line highlighting and would never include such a feature in my plugin.

                            EkopalypseE 1 Reply Last reply Reply Quote 3
                            • EkopalypseE
                              Ekopalypse @tomasz1986
                              last edited by

                              @tomasz1986

                              one possible alternative would be to disable that behavior at all
                              and using indicators with a scripting language plugin like
                              this. Note, code is just a demo - I haven’t really looked deeper to see
                              whether there is something else to do.

                              f1b5dfa6-66dc-45a3-8b19-be3c4c5aca9f-image.png

                              1 Reply Last reply Reply Quote 3
                              • EkopalypseE
                                Ekopalypse @dinkumoil
                                last edited by

                                @dinkumoil @tomasz1986

                                sorry but to be honest, I am lost about your discussion with selection and highlighting. If we talk about the selecting lines then the scintilla functions
                                SCI_SETSELFORE(bool useSetting, colour fore) (this is fgColor which isn’t used by npp)
                                SCI_SETSELBACK(bool useSetting, colour back)
                                needs to be used. If it is about the other matches then it is smart highlighting
                                and what are you talking about?

                                dinkumoilD tomasz1986T 2 Replies Last reply Reply Quote 0
                                • dinkumoilD
                                  dinkumoil @Ekopalypse
                                  last edited by

                                  @Ekopalypse said in [New Plugin] ExtSettings:

                                  what are you talking about?

                                  After finishing the topic “selection highlighting” @tomasz1986 started talking about “current line highlighting”. I’ve messed up things in my answer and wanted to clarify later on. But I think we should let it go now…

                                  1 Reply Last reply Reply Quote 2
                                  • tomasz1986T
                                    tomasz1986 @Ekopalypse
                                    last edited by tomasz1986

                                    @Ekopalypse said in [New Plugin] ExtSettings:

                                    and what are you talking about?

                                    Yeah, I was just happy that I could set “filling alpha” to “0” and “outline alpha” to “255”, so that Smart Highlighting would show only border with no background colour (which is the same as in Sublime Text, by the way). Then, I started asking about doing the same for ordinary (i.e. not smart) text selection, and the discussion went from there.

                                    1 Reply Last reply Reply Quote 1
                                    • tomasz1986T
                                      tomasz1986
                                      last edited by tomasz1986

                                      @dinkumoil I think I have found a small issue regarding the plugin’s settings and about windows. When I open any of them, and then switch to a different program in Windows, it is impossible to go back to Notepad++ by clicking its taskbar button. I can only go back by using Alt+Tab. Just for reference, as I have not checked other Windows versions, this is happening in Windows 7 Enterprise x64 with Classic Theme enabled.

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

                                        @tomasz1986 said in [New Plugin] ExtSettings:

                                        found a small issue regarding the plugin’s settings … When I open any of them, and then switch to a different program in Windows, it is impossible to go back to Notepad++ by clicking its taskbar button.

                                        Thank you, I will have a look at that.

                                        1 Reply Last reply Reply Quote 0
                                        • EkopalypseE
                                          Ekopalypse
                                          last edited by

                                          @dinkumoil

                                          another one :-) (npp doesn’t use it at all as far as I can see)
                                          The differences, between 0 and 1, are more visible on the display as
                                          in the image but I guess still noticeable.

                                          my default font size

                                          952ca386-5ecc-416f-b9bf-bc42caf41937-image.png

                                          max font size

                                          90358878-71bc-4d8b-9eba-26f64d690258-image.png

                                          Alan KilbornA dinkumoilD 2 Replies Last reply Reply Quote 1
                                          • Alan KilbornA
                                            Alan Kilborn @Ekopalypse
                                            last edited by

                                            @Ekopalypse

                                            Which “technology” do you prefer? I don’t see much if any difference.

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