Jump to content

midora

Members
  • Posts

    1,782
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by midora

  1. Accessibility: Mouse Pointer Size
    If paint.net could adjust is cursors using the multiplier provided in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Accessibility\CursorSize then this would help some users.
    In the moment only the standard arrow and move selection adjusts its size. Size is 16 * (CursorSize + 1). CursorSize [1..15].
    BTW: I'm getting the system move cursor for Move Selection and Move Selected Pixels. I thought that earlier they looked more like the icons in the tool window but it's the same in 4.2.16 (win 10) so maybe I'm wrong.

  2. 19 hours ago, Rick Brewster said:
    • Fixed many long-standing issues with keyboard/mouse focus, whereby tool shortcuts would not work when the mouse was in certain places (e.g. over the Tools or History window)

     

     

    I did various tests and for me this fix worked flawless on Win10 now.
     

    What I'm still missing is a solution for the non-letter control shortcuts like Ctrl++ (Zoom In) in various keyboard layouts. I expect that paint.net looks for Ctrl+OEMPLUS and Ctrl+ADD. But in many cases you have to add Shift to reach the plus sign. So this is not working in paint.net.

     

    In my own applications I'm asking the system which key code produces the plus sign and add Ctrl to get the right key combination.

            if (keyData == DeviceKeyboard.OemCharacterToKeys(Keys.Control, '+')) ...

           

            public static Keys OemCharacterToKeys(Keys modifiers, char c)
            {
                return modifiers | CharactertoKeys(c);
            }

            private static Keys CharactertoKeys(char c)
            {
                // Map character to scan code
                short scanCode = VkKeyScanW(c);

                // Translate scan code to key
                Keys key = (Keys)(scanCode & 0x00FF);
                if ((scanCode & 0x0100) != 0) key |= Keys.Shift;
                if ((scanCode & 0x0200) != 0) key |= Keys.Control;
                if ((scanCode & 0x0400) != 0) key |= Keys.Alt;

                return key;
            }

            [DllImport("user32.dll", CharSet = CharSet.Unicode)]
            private static extern short VkKeyScanW(char ch);

     

    This would work also if you are changing the keyboard layout while the application is running.

     

    To center the content below the mouse pointer in the window Ctrl+. may be used (together with shifting the mouse using Cursor.Position=centerPoint).

     

     

  3. It was just not required to add a token up to now. There was no abstract definition or documentation which forced you to do it. I try to keep sw minimal. I asked about tool plugins which do not modify the image (to avoid the useless call of copying the current content in Render()) i.e. by a configuration flag. Why is this not possible? I had no intention to make you developer life more difficult 😉

    These tools have been used for years without any issue. If they now fail in 5.0 then something has changed in the internal handling of plugins and they are no longer compatible. You can spent some time to keep them alive or not and block them. Or discuss a better solution for these kind of plugins. That's on your side.

×
×
  • Create New...