Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support larger icons and icons with text labels #560

Open
bitandquit opened this issue May 13, 2024 · 4 comments
Open

Support larger icons and icons with text labels #560

bitandquit opened this issue May 13, 2024 · 4 comments

Comments

@bitandquit
Copy link

Description

First, thanks for this project, a cross-platform Notepad++ is amazing.

One feature that has always frustrated me about Notepad++ are the tiny icons and there is no option to have icons with labels. I understand this is against the modern trend of "flat, colorless UIs" but often as you flip between many different programs (common in programming or engineering) having a labeled icon makes life much much easier.

Further, supporting larger icons is very helpful as modern high-DPI displays (1440p, 4K, etc) make these tiny icons meant for 96 DPI screeens very hard to see.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

@dail8859
Copy link
Owner

One feature that has always frustrated me about Notepad++ are the tiny icons and there is no option to have icons with labels.

Luckily Qt supports this easily, it is just having the application enable it. Long term this probably needs to be a setting/preference.

For fun you can enable this with a couple hoops to jump through:

You can create a css files (e.g. test.css)

.QToolButton {
	qproperty-toolButtonStyle: ToolButtonTextUnderIcon;
}

And then tell the application to load this as an additional style sheet:

"C:\Program Files\Notepad Next\NotepadNext.exe" --stylesheet "test.css"

image

Now that I'm thinking about it, it might be good to have it always check for a user defined style sheet on startup.


Further, supporting larger icons is very helpful

Agreed. The difficult part here is the original icon pack that Notepad++ started out with and now used by this application is quite old and only provided 16x16 pixel icons. So the newer Notepad++ icons would have to be used or some other icon pack.

@BLumia
Copy link

BLumia commented Jul 5, 2024

Maybe a possible option is adopting KDE Framework's KXMLGUI?

KXMLGUI provide such feature out-of-the-box, user can then:

  1. adjust the icon size on the toolbar freely
  2. adjust the text visibility and position freely for toolbar actions
  3. add, remove, rearrange any icons on the toolbar freely
  4. built-in quick search panel for all available menu/toolbar actions
  5. optional ability to allow user hide the menu bar and use toolbar-only, move existing menu to a hamburger menu

It looks like:

image

(Screenshot of Kate editor under Windows, which uses KXMLGUI)

The downside is we'll need to adapt existing code logic to use KXMLGUI, and it will also introduce KXMLGUI and its dependencies as NotepadNext's dependencies so current CI setup will also need to be altered to be able to build these dependencies. But if it can be adapted, some other features offered by KDE Framework can also be reused as well, like (dark) theme support for the main window, easier application config logic offered by KConfigXT and so on.

@diegoiast
Copy link
Contributor

If you just want to use any freedesktop icon set, from Qt its trivial. However, deploying is a pain. Fortunatelly - I have already solved it. You can take this CMake, and deploy it locally. It will download the breeze icon set - however, you can choose whatever icon set you want. You will also need to "install the icons" and fix the app image/setup/app-bundle

https://github.com/diegoiast/qtedit4/blob/main/cmake/icons-breeze.cmake

For windows you could deploy these icons: https://www.opendesktop.org/p/1581320 for example.

@BLumia
Copy link

BLumia commented Jan 22, 2025

If you just want to use any freedesktop icon set, from Qt its trivial. However, deploying is a pain.

Related to this, KDE's breeze-icon is actually quite easy to deploy! See https://cullmann.io/posts/kde-applications-and-icons/ for a blogpost related to how it works now, and all you need to do is KIconTheme::initTheme(); and it will do the rest of the work for you. See an example patchset here at https://invent.kde.org/utilities/kcharselect/-/merge_requests/20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants