This is an automated email from the ASF dual-hosted git repository.

ebakke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 42d86921c1 [NETBEANS-5729] MacOS: Support HiDPI scaling in TreeView's 
long file name tooltip (e.g. in Projects pane)
42d86921c1 is described below

commit 42d86921c1088966061384414deb6288b243349a
Author: Eirik Bakke <[email protected]>
AuthorDate: Mon Aug 12 15:43:23 2024 -0400

    [NETBEANS-5729] MacOS: Support HiDPI scaling in TreeView's long file name 
tooltip (e.g. in Projects pane)
    
    The relevant improvement had already been made for Windows back in 2016, 
but seems to have been left unactivated for MacOS, probably because the author 
didn't have a Mac to test on. The trick is to create the BufferedImage via 
JComponent.createVolatileImage instead of 'new BufferedImage' (matching my own 
earlier experience with how HiDPI support in implemented in Swing). I simply 
removed the !isMac() condition.
    
    The historical commit that introduced the related code is here: 
https://github.com/eirikbakke/netbeans-releases/commit/707013e449d6147402c92e2ba7d348a933c3e8d6#diff-4bc2ee6c72afdca0c960c205bedd2a606eb0657dad93ff82c7a93fbd1d5b0dc5R524
    
    This issue was previously tracked at 
https://issues.apache.org/jira/browse/NETBEANS-5729
---
 .../openide.explorer/src/org/openide/explorer/view/ViewTooltips.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/platform/openide.explorer/src/org/openide/explorer/view/ViewTooltips.java 
b/platform/openide.explorer/src/org/openide/explorer/view/ViewTooltips.java
index 1781bded51..38ab5fd421 100644
--- a/platform/openide.explorer/src/org/openide/explorer/view/ViewTooltips.java
+++ b/platform/openide.explorer/src/org/openide/explorer/view/ViewTooltips.java
@@ -496,8 +496,7 @@ final class ViewTooltips extends MouseAdapter implements 
MouseMotionListener {
             // get some reasonable limit for the width
             int width = Math.min(dd.width, 2 * currentScreenBounds.width);
             int height = Math.min(dd.height + 2, 2 * 
currentScreenBounds.height);
-            Image nue = !Utilities.isMac() ? owner.createVolatileImage(width, 
height) :
-                        new BufferedImage(width, height, 
BufferedImage.TYPE_INT_ARGB);
+            Image nue = owner.createVolatileImage(width, height);
             Graphics g = nue.getGraphics();
             g.setColor (bg);
             g.fillRect (0, 0, width, dd.height + 2);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to