• Login
Community
  • Login

Whitespace background cannot be changed

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 171 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.
  • H
    HalfOffHell
    last edited by Feb 19, 2025, 3:42 PM

    whitespace background cannot be changed.png
    There is an option in the style configurator, but it does nothing

    P 1 Reply Last reply Feb 19, 2025, 4:08 PM Reply Quote 0
    • P
      PeterJones @HalfOffHell
      last edited by Feb 19, 2025, 4:08 PM

      @HalfOffHell .

      The documentation already tells you it’s foreground only.
      4f94caed-69a0-4f37-b85a-0354a675c22f-image.png

      And in my v8.7.5, the “background” is greyed out, so you cannot try to change it.

      77edc7e0-2cd3-4045-a037-a670efd7233f-image.png

      If I look at the stylers.model.xml or similar (ie, a theme maintained by the N++ developer), in the <GlobalStyles> section, the “White space symbol” doesn’t have a bgColor attribute, which is what causes it to gray out, I think
      c60ce5d5-3dfe-42a2-b7f7-290828c3a51c-image.png

      <WidgetStyle name="White space symbol" styleID="0" fgColor="FFB56A"></WidgetStyle>
      

      That implies that your “Material theme” incorrectly added that attribute (or that it was derived from an earlier version of the model, which incorrectly had that attribute). So to make it match reality, you should edit your “Material theme”'s XML to not have bgColor attribute for the “White space symbol” entry, so that you don’t confuse yourself in the future.

      H 1 Reply Last reply Feb 19, 2025, 5:11 PM Reply Quote 1
      • H
        HalfOffHell @PeterJones
        last edited by Feb 19, 2025, 5:11 PM

        @PeterJones whitespace symbol gets wider isntead of taking up the whitespace.png

        1. do you know any way to make the whitespace symbol take up the entire whitespace then? currently increasing whitespace size makes the symbol wider, which makes it obstruct nearby characters.
        2. or, will whitespace background ever be added?
        3. delimiters can change the background of whitespaces, but folding is disabled inside delimiters (and folding styles have nesting options greyed out), will that ever be changed
        P 2 Replies Last reply Feb 19, 2025, 6:44 PM Reply Quote 0
        • P
          PeterJones @HalfOffHell
          last edited by Feb 19, 2025, 6:44 PM

          @HalfOffHell said in Whitespace background cannot be changed:

          1. do you know any way to make the whitespace symbol take up the entire whitespace then? currently increasing whitespace size makes the symbol wider, which makes it obstruct nearby characters.

          Nope, it’s not designed to do that.

          1. or, will whitespace background ever be added?

          Doubtful, though I don’t think anyone has ever made an official feature request for that.

          In my experience, you are the first user who wants whitespace indicators to not use the same background color as the rest of the text, and the developer doesn’t tend to work on such niche requests. But, of course, we’d never know for sure unless someone requested it.

          1. delimiters can change the background of whitespaces, but folding is disabled inside delimiters (and folding styles have nesting options greyed out), will that ever be changed

          Doubtful, though I don’t think anyone has ever made an official feature request for that.


          Reference

          • FAQ: Feature Request or Bug Report
          1 Reply Last reply Reply Quote 3
          • P
            PeterJones @HalfOffHell
            last edited by PeterJones Feb 20, 2025, 9:09 PM Feb 20, 2025, 9:05 PM

            @HalfOffHell ,

            Your screenshot is of a “normal text file”. But it appears to actually have PythonScript, at least on the non-red-boxed line.

            So if you are coding in some language, many of the language lexers have a DEFAULT color – including Python – which is used for the spaces. So it might be than changing Language: Python > Style: DEFAULT > Background colour is sufficient for you.

            For example:
            433c1575-a1d1-4852-9fba-c5e9e4aff5e7-image.png

            Caveat: Not all languages have or use a DEFAULT style for whitespace – and some that have the DEFAULT also use it for real text that doesn’t match any of their other Styles while lexing, not just whitespace, so changing the background of a language’s DEFAULT style might not work like you want for all languages … But for what I remember of Python, it doesn’t use the DEFAULT style for anything but whitespace, so it may meet at least some of your desires.

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