You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "DevCharly (via GitHub)" <gi...@apache.org> on 2023/04/01 17:29:59 UTC

[GitHub] [netbeans] DevCharly opened a new pull request, #5760: FlatLaf: use NetBeans folder icons in NB Explorer

DevCharly opened a new pull request, #5760:
URL: https://github.com/apache/netbeans/pull/5760

   Currently there is a mix between NetBeans style icons and FlatLaf outlined folder icons in many views (e.g. in Projects or Files views), which does not look good. This PR replaces the FlatLaf folder icons with NetBeans style icons in NB Explorer component.
   
   @eirikbakke @neilcsmith-net
   ATM this PR uses icons from module `o.n.swing.plaf` in module `o.n.swing.laf.flatlaf`.
   It works, but I'm not sure whether this is allowed?
   Or is it better to copy the icons?
   
   ### Before:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305053-64e489e9-17cf-421b-9087-b06aa70e7291.png)
   
   ### After:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305104-d20407d3-c2b9-47f8-94fb-1abbdc2e9d36.png)
   
   ### Dark Before:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305259-fc8976fd-7ee9-4e8c-89cc-95e4a0788dd3.png)
   
   ### Dark After:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305244-41e6a9d0-7df3-44a3-86c5-d9c7e77fb2d4.png)
   
   ### New Project before:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305383-503ccbb1-ff11-4656-880c-0f30430e09f2.png)
   
   ### New Project after:
   ![grafik](https://user-images.githubusercontent.com/5604048/229305398-2317ca54-6908-41ee-86cd-704565366153.png)
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493104348

   I agree with @DevCharly here; the rest of NetBeans has a particular style of icons which should be used consistently throughout the app, so this PR is an improvement. (In fact I have this change made already in my private NetBeans build...)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500452511

   > Only thing that might want changing now is that we should probably use the localized form of `loadImage()` and pass in `true`?
   
   Ignore that - looks like the other LAF code doesn't either from https://github.com/apache/netbeans/blob/master/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/util/UIUtils.java#L90 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493140510

   ok. so can we make this optional?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493325253

   > > ok. so can we make this optional? e.g via "Use FlatLAF icons" checkbox or flag?
   > 
   > This is one icon out of hundreds; perhaps just make it configurable via FlatLAF.properties?
   
   sure why not - whatever works best. There is also still a lot of empty space in the FlatLaf option dialog. And this isn't really about one icon btw, the file dialogs do use more FlatLAF icons. There is a screenshot on the end of the original PR #5298


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on a diff in pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on code in PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#discussion_r1155169943


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLFCustoms.java:
##########
@@ -78,6 +79,9 @@ public Object[] createApplicationSpecificKeysAndValues() {
             // necessary for org.openide.explorer.propertysheet.PropertySheet and others
             CONTROLFONT, UIManager.getFont("Label.font"), // NOI18N
 
+            EXPLORER_FOLDER_ICON ,       ImageUtilities.loadImage("org/netbeans/swing/plaf/resources/hidpi-folder-closed.png"),
+            EXPLORER_FOLDER_OPENED_ICON, ImageUtilities.loadImage("org/netbeans/swing/plaf/resources/hidpi-folder-open.png"),

Review Comment:
   Yeah, I checked this and the keys actually need to be "Tree.closedIcon" and "Tree.openIcon", otherwise in some cases you get a mix of folder icons like this:
   
   <img width="314" alt="folder-karlspr" src="https://user-images.githubusercontent.com/886243/229313123-1b0f116f-a6c9-463c-8c0c-d74aebf0ae30.png">
   
   (Probably because some parts of NetBeans explicitly looks for these icons in the JTree UIManager properties.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493366763

   > This kind of got into the NB17 release accidentally without much discussion, and we should be careful of such in future, but I'm not sure putting it immediately back again as the default in NB18 is a good idea.
   
   With cosmetic changes like this I think we just need to discuss whether each PR is a net improvement or not; stability is mainly a concern for API changes, or UI changes that affect users' workflows.
   
   > There is also still a lot of empty space in the FlatLaf option dialog. 
   
   We may have different philosophies here, but I think having a large number of explicitly exposed options, about very minute details of the UI, reduces usability (due to [decision fatigue](https://www.nngroup.com/articles/simplicity-vs-choice/)). But the [ability to easily change FlatLAF.properties](https://github.com/apache/netbeans/pull/4719), which is more obviously an "advanced" feature, is very nice. It could even be the basis for a "skinning" feature in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493371893

   > We may have different philosophies here, but I think having a large number of explicitly exposed options, about very minute details of the UI, reduces usability (due to [decision fatigue](https://www.nngroup.com/articles/simplicity-vs-choice/)).
   
   no i do understand this problem. Adding options for everything is not my first choice, there is a budget for that too. But UI topics specifically have the tendency to be very user specific. I still see users having nimbus LAF enabled from time to time for example (which is to my eyes super ugly and also somewhat broken in NB). And we clearly have a situation here of some liking the new icons and caring less about consistency (or rising valid points of not flip flopping between two states from release to release), and others caring more about consistence and/or maybe not liking the new icons. This maps beautifully to a checkbox. We can make both camps happy - that is all I am trying to say :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493183702

   > ok. so can we make this optional? e.g via "Use FlatLAF icons" checkbox or flag?
   
   This is one icon out of hundreds... perhaps just make it configurable via FlatLAF.properties?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500434811

   Thanks @DevCharly Locked and unlocked to force a CI build (needed to trigger if you change the labels).
   
   Only thing that might want changing now is that we should probably use the localized form of `loadImage()` and pass in `true`?
   
   Aside : Would be great if it was possible to link images directly in the FlatLaf properties file loading, although I guess that would add some complications, particularly as we'd want to specify the class (ImageUtilities) that loads them.  Maybe an option to include a second String argument (eg. path) on the line to pass into the icon constructor? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] Chris2011 commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "Chris2011 (via GitHub)" <gi...@apache.org>.
Chris2011 commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493456876

   Also for options, for me I'm a huge fan to make everything configurable. Sure we try to make everything right for the most of the people, but you can't. Neither for style nor for other defaults. And if you see VS Code or JetBrains how much they have to be configured it is just wow. But this is a whole other discussion. It just came into my mind as there was a mention here about philosophy. And please don't get me wrong, I also like the new icons, but it is really hard to see them in between all of the other old icons. I also like it more colorful so what about colored outlined icons? Next thing. So for example in VS Code the default icons, I don't like because it was hard for me to see a difference between files sometimes and folders because folders doesn't have icons by default. Switched to material icon theme and everything was fine and not just for the type of choice but for a better user experience on my side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on a diff in pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on code in PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#discussion_r1155166360


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLFCustoms.java:
##########
@@ -78,6 +79,9 @@ public Object[] createApplicationSpecificKeysAndValues() {
             // necessary for org.openide.explorer.propertysheet.PropertySheet and others
             CONTROLFONT, UIManager.getFont("Label.font"), // NOI18N
 
+            EXPLORER_FOLDER_ICON ,       ImageUtilities.loadImage("org/netbeans/swing/plaf/resources/hidpi-folder-closed.png"),
+            EXPLORER_FOLDER_OPENED_ICON, ImageUtilities.loadImage("org/netbeans/swing/plaf/resources/hidpi-folder-open.png"),

Review Comment:
   I have a similar patch in my own NetBeans build, but in that case I used "Tree.closedIcon" and "Tree.openIcon" as the UIManager keys instead of "Nb.Explorer.Folder.icon" (EXPLORER_FOLDER_ICON) and "Nb.Explorer.Folder.openedIcon"(EXPLORER_FOLDER_OPENED_ICON). Perhaps the former is better, since it is probably applied in both the NetBeans explorer components as well as in the more general JTree component?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493066226

   I actually liked the new icons :(


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] Chris2011 commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "Chris2011 (via GitHub)" <gi...@apache.org>.
Chris2011 commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493457625

   > Yeah, agree that visual preferences are very user-specific
   
   I would say a clear yes and no. Of course, we have our own preferences and also there are some "standards" out there which where tested (most of the time) and where someone wrote about it like studies, etc. So I would say a good user interface can have both: a really good and stable base + the user preferences


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] DevCharly commented on a diff in pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#discussion_r1163122502


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatTreeClosedIcon.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.swing.laf.flatlaf.ui;
+
+import javax.swing.ImageIcon;
+import org.openide.util.ImageUtilities;
+
+/**
+ * "closed" icon for {@link javax.swing.JTree} used by {@link javax.swing.tree.DefaultTreeCellRenderer}.
+ *
+ * @author Karl Tauber
+ */
+public class FlatTreeClosedIcon extends ImageIcon {
+
+    public FlatTreeClosedIcon() {
+        super( ImageUtilities.loadImage( "org/netbeans/swing/plaf/resources/hidpi-folder-closed.png" ) ); // NOI18N

Review Comment:
   @eirikbakke sorry, I have completely overlooked your patch. It is much better than that what I've implemented. I've replaced my implementation with your patch. (tested on Windows at 150% and macOS at 200%)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] Chris2011 commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "Chris2011 (via GitHub)" <gi...@apache.org>.
Chris2011 commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493454959

   We should try to change all icon styles like an icon theme at once or not. First we started redrawing NetBeans icons with new ones, which is great and I really appreciates it, but we had mixed really nice flat looking icons wich old not so flat looking icons. Now we added another style to the icons like outlined. IMHO either we should to switch to old, to flat or to outlined all at once or not. But changing icons, step by step looks in some cases really weird and not really wanted.
   
   I know that this is a big effort to do but maybe we should start with this first and not trying to change icons in those areas and next in those, etc. My 2 cents.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493106999

   > ATM this PR uses icons from module o.n.swing.plaf in module o.n.swing.laf.flatlaf.
   > It works, but I'm not sure whether this is allowed?
   > Or is it better to copy the icons?
   
   I've been doing the same in my private NetBeans build for over a year, with no problem. If it works, I think it's fine (since copying the icons has its own downsides).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] DevCharly commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500481279

   > Aside : Would be great if it was possible to link images directly in the FlatLaf properties file loading, although I guess that would add some complications, particularly as we'd want to specify the class (ImageUtilities) that loads them. 
   
   That could be solved by specifying an "icon loader". E.g.:
   
   ~~~java
   FlatLaf.iconLoader = org.openide.util.ImageUtilities.loadImage()
   Tree.closedIcon = org/netbeans/swing/plaf/resources/hidpi-folder-closed.png
   ~~~
   
   Then FlatLaf could detect whether the icon is specified as a path and use the icon loader to load it.
   
   > Maybe an option to include a second String argument (eg. path) on the line to pass into the icon constructor?
   
   Also a good idea.
   
   I'll implement those ideas in one of the next FlatLaf versions. Thx
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on a diff in pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on code in PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#discussion_r1163149303


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatTreeClosedIcon.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.swing.laf.flatlaf.ui;
+
+import javax.swing.ImageIcon;
+import org.openide.util.ImageUtilities;
+
+/**
+ * "closed" icon for {@link javax.swing.JTree} used by {@link javax.swing.tree.DefaultTreeCellRenderer}.
+ *
+ * @author Karl Tauber
+ */
+public class FlatTreeClosedIcon extends ImageIcon {
+
+    public FlatTreeClosedIcon() {
+        super( ImageUtilities.loadImage( "org/netbeans/swing/plaf/resources/hidpi-folder-closed.png" ) ); // NOI18N

Review Comment:
   Yeah, sorry, my patch was kind of buried in there, and I wasn't sure if FlatLAF had its own icon loading magic. Thanks for the update!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien merged pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #5760:
URL: https://github.com/apache/netbeans/pull/5760


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493082060

   Agree with @mbien Now we've already had a release with these I think we should keep them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on a diff in pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on code in PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#discussion_r1161853414


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatTreeClosedIcon.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.swing.laf.flatlaf.ui;
+
+import javax.swing.ImageIcon;
+import org.openide.util.ImageUtilities;
+
+/**
+ * "closed" icon for {@link javax.swing.JTree} used by {@link javax.swing.tree.DefaultTreeCellRenderer}.
+ *
+ * @author Karl Tauber
+ */
+public class FlatTreeClosedIcon extends ImageIcon {
+
+    public FlatTreeClosedIcon() {
+        super( ImageUtilities.loadImage( "org/netbeans/swing/plaf/resources/hidpi-folder-closed.png" ) ); // NOI18N

Review Comment:
   Did you check if this results in the icon being painted with proper HiDPI/retina resolution on MacOS, and on Linux?
   
   I checked on Windows 11 and it works there, on both 150% HiDPI scaling and 200% HiDPI scaling.
   
   Alternatively the NBFlatAdapterIcon approach from https://gist.github.com/eirikbakke/5587bd548a668cb0588c3fdc7d9e9f48 should work in all cases.
   
   In general, the safest way to get HiDPI scaling is to override Icon.paintIcon and avoid BufferedImage/ImageIcon altogether. But due to BufferedImage/ImageIcon being used in a lot of places, there are various tricks in both AWT and in ImageUtilities that makes HiDPI scaling work even for BufferedImage in many cases. But I think it can have issues e.g. when different screens have different DPI scalings (e.g. where ColorMode.createCompatibleWritableRaster in ImageUtilities.ToolTipImage.createNew might produce a raster for 150% HiDPI scaling but another screen might then end up upscaling that graphics to 200% HiDPI scaling, producing poor quality).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500446139

   @DevCharly awesome, thanks! Tested it and it works great. I was a bit worried about the folder icon in the file chooser but it remained unchanged, which is good for consistency reasons I believe (otherwise the problem would just have moved from one place to another).
   ![folder-icon](https://user-images.githubusercontent.com/114367/230644322-9c378777-f536-4769-a434-dabc466fadf6.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] DevCharly commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500409428

   Thanks for all the feedback.
   
   Have updated the implementation.
   It now sets `Tree.closedIcon` and `Tree.openIcon` (thanks @eirikbakke).
   
   And the icons are now set in `FlatLaf.properties` (was class `FlatLFCustoms` before),
   which allows overriding them in custom properties ("Edit custom properties" button in FlatLaf Options dialog).
   
   @mbien add this to custom properties to change them back to FlatLaf outlined icons:
   
   ~~~properties
   Tree.closedIcon = com.formdev.flatlaf.icons.FlatTreeClosedIcon
   Tree.openIcon = com.formdev.flatlaf.icons.FlatTreeOpenIcon
   ~~~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493275588

   I was talking to @geertjanw about release notes, screenshots, etc. and one of the things he mentioned with that was the positive fact that the default UI has begun to stabilise after some period of flux.  This kind of got into the NB17 release accidentally without much discussion, and we should be careful of such in future, but I'm not sure putting it immediately back again as the default in NB18 is a good idea.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] eirikbakke commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1493378063

   Yeah, agree that visual preferences are very user-specific. (If you remember the old [Winamp](https://skins.webamp.org/) MP3 player, it was hugely popular in part because people could change its skin...)
   
   > And we clearly have a situation here of some liking the new icons and caring less about consistency
   
   I think what's happening is that some people see the new folder icon, which has a more modern style, and assume that it's part of some broader effort to migrate all the icons to the new style. Or perhaps not; do you really prefer the "mix" of styles yourself?
   
   But I'm fine with new preferences as long as someone really think they are justified.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #5760: FlatLaf: use NetBeans folder icons in NB Explorer

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #5760:
URL: https://github.com/apache/netbeans/pull/5760#issuecomment-1500094666

   > stability is mainly a concern for API changes, or UI changes that affect users' workflows.
   
   I would have said the same thing before conversation with Geertjan on it - hadn't considered stability of the defaults for screenshots, user familiarity, etc.
   
   However, as that won't be relevant until NB18, and thinking about this more while using the IDE over the last few days, I'm coming around to the argument for switching it back now and thinking about icon changes more thoroughly and consistently later.  With the changes to use Tree icons @eirikbakke mentions above.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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