-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Blurred icons #700
Comments
The icons on the left panel are very small pixel graphics (22x22px), those in the menu on the right are vector graphics with 48x48px which could be set to a higher resolution. On the top panel are icons from your icon theme, which obviously have a higher resolution already. We'd need bigger icons for the left panel, I guess. Maybe other icons because the ones we currently have also behave badly on dark GTK themes. |
The icons you see on the left panel are 48X48 vector graphics I created for Shutter just to see if the problem was related to the pixel graphics icons. The icons on the right panel are original Shutter 48x48 vector graphics icons which should be clear and crisp. And why wouldn't they be when the icons on the top panel from the system theme are also vector icons and have the same 48x48 resolution? I seems to me that Shutter's annotation editor has a problem with icon resizing. |
Anyone? Any idea why the ToolBarDrawing icons in the Shutter's built in annotation tool are blurred/pixelated? I've tried to replace them with vector icons (svg) and even with high quality png icons but nothing's changed. |
It's all in |
Actually, it says
at https://docs.gtk.org/gtk3/ctor.IconSet.new_from_pixbuf.html Possibly this pixelation and scaling adjustments make the icons blurry. |
Since this class is deprecated, maybe we can switch to https://docs.gtk.org/gtk3/class.IconTheme.html and use |
Would it be possible to make Shutter annotation tool use system icon theme instead by replacing this:
etc. with
etc. in UIManager.pm ? |
So, everything is in UIManager.pm. Thanks for your help. :) |
I think, this won't work for all icons because some of them just aren't available from GTK themes. Like the pixelation or the numbering buttons. |
Doing some progress. Fixed main toolbar. Replaced the pixelated pointer icon with a vector (svg) one. Changed the code in Toolbar.pm to this:
And now the selection icon looks crisp and clear. |
Nice! Now we just need to find some highres or vector icons for the various buttons! |
Creating some nice icons is not a problem at all. I'll do that. The problem is that I am not able to load custom svg (vector) icons, so I'll need your help. Here is what I've found out so far.
If I use create_factory method in UIManager.pm it's possible to load custom vector (svg) icons but they are as blurred as the png ones. If I remove completely create_factory from the UIManager.pm and change the name of the icons in the _create_drawing_actions to gtk- stock ones, then the gtk- vector icons show up crisp and clear. The problem is that there aren't any gtk- stock icons we can use for our drawing actions. If I change the name of the icons in the create_drawing_actions (UIManager.pm) to any other icons than gtk- stock icons then the icons don't show up at all and the buttons are completely blank. If I use: sub _load_custom_icons {
} and this: sub _create_drawing_actions {
} then only gtk-ok icon shows up, and all other buttons are blank. What am I doing wrong? |
That would be great! In case, you really tackle this, please have a look at #382 first, people have problems with our currently used icons and it would be great, if they could be solved!
Unfortunately, I'll be super busy at work for at least another week, so I cannot do any research on this topic immediately, but did you try this: #700 (comment) ? |
So frustrating. I wrote a small simple-test.pl script to test whether the custom icons would load or not. As you can see it they load perfectly sharp. But when I compile Shutter with the modified UIManager.pl the custom svg icons don't show up. That's why I need your help. I am not a programmer and I am pretty clueless when it comes to perl programming. |
Sounds familiar, that's how I ended up in the Shutter team. 😄
You could try to add debug output to the line where the icons should be loaded in UIManager.pl, then see if there are any useful warnings or errors around. Something like
But that's just an idea from a person who is clueless when it comes to perl prorgramming himself. Maybe @DarthGandalf has further ideas! Thanks for spending so much time and effort trying to fix this issue! P.S.: Really nice icons you created there! |
To be honest, I liked the colorful icons more, they are visible on both light and dark GTK themes and don't include a white background which looks a bit ugly on dark GTK themes. Maybe just make the icons for shapes like arrow, ellipse or rectangle red (since this is the default color for them as well) to make the icons well visible on light and dark GTK themes? |
Again, the icons are not the problem, the problem is that we can't load svg icons into the toolbar_drawing without them being blurry and pixelated. |
Absolutely, I just wanted to comment on the icons as you posted some screenshots! Regarding the actual issue, did you try adding print lines to find the output lines of interest among the hundreds of irrelevant lines that Shutter prints easier? |
Looking at this code, I noticed that it uses lots of outdated Gtk functions: GtkUIManager, GtkActionGroup. Basically, the whole UI of the draw tool need to be replumbed to either GtkBuilder or creating the objects directly in perl. That would remove the limitation you found with svgs |
So, if I understand correctly, that would mean that UIManager.pl is obsolete as well and the whole UI code should be moved...where? DrawingTool.pl? Why not create a whole new annotation application based on the Shutter's DrawingTool? |
For example, yes. In the prototype I started for Rust/Gtk4 port a while ago (and never finished), I've put that to a separate xml file: https://github.com/shutter-project/shutter-rust/blob/master/resources/editorwindow.ui but this XML is a different format from GtkUIManager's one.
That would be nice |
The new Annotator/DrawingTool should have only two toolbars, both horizontal: This is the old one with the vertical Drawing Toolbar, blurred png icons, and image loaded at the left side: |
Woah, nice! I'd like to open the discussion with some feedback from my perspective. Things I like a lot about the new prototype:
Things that I'd like to mention to possibly reconsider:
Also, a question: the menu bar (File, Edit, Tools, View) is gone now. This removes some export options and the copy/cut/paste options. Also, if it will be a standalone app, it'd need a Help/Info menu, I think. Is it intended or did you just not take care of it so far? Overall, I really like the new prototype! Thanks for spending so much time and effort working on it! |
I'm glad you like some of the suggested solutions. I'm mostly looking forward to finally having an annotation application in Linux that can draw polygons, curved/arched & dotted lines and arrows. Here are my thoughts: 1. Toolbars placement & width We should let users to decide where to place the toolbars. Top, bottom, right or left. One or all of the toolbars. Also, we should let users decide how wide the toolbars are. I have a 32" monitor, I use HiDPI and my toolbars will always be wider and bigger than for users who use small laptop screens with a 1366 x 768 pixel resolution. I disagree about the three separate toolbars but I understand that the third one is probably necessary when your drawing toolbar is placed on the left or right side. From a usability point of view, it's better to have the Fill colour, Stroke colour, Line width and Font settings buttons on the drawing toolbar rather than at the bottom on the status bar. Whether you use the keyboard or the mouse pointer. It's all up there and you don't have to jump from toolbar to toolbar. 2. Main toolbar and stock GTK icons Yeah, GTK should be default, but let users decide what kind of icons they want 3. Numbering tool I agree that the icon in the screenshot is not optimal, but that's only temporary. 4. Dark themes Agreed. The icons should be designed so that they are all equally visible when dark themes are used. They should be either all coloured or all grey (symbolic). 5. Menu bar There will be a menu bar. |
With lots of tools being added, please don't fall into a feature creep mode |
This looks damn nice! 😃 👍 |
arrowsandlines.mp4 |
This Perl application is 86.3 Kb. Perl rocks. Polygon drawing not perfect yet but usable. polygon.mp4 |
I implemented both. Default is with all toolbars at the top: In the View menu you can chose to hide the main toolbar and to move the drawing toolbar to the left: And here is how it looks like with the drawing toolbar on the left (like the original Shutter's DrawingTool). The difference is that all toolbar icons can be replaced with the clear and crisp svg icons (no more blurriness), we have now dashed and dotted lines arrows etc., bended/curved lines and arrows, polygons, text written/drawn and edited directly on the image, custom icon themes for the toolbars, position changing for the drawing toolbar and hiding for the main toolbar, semitransparency and blurriness that reflect loaded images' color (if possible): What's new:
This is how I like the UI most (with the main toolbar hidden): To do:
The application is now huge and has 107.3 Kb. ;) |
Some of the Shutter icons are crisp and clear and some are blurred. Can you please tell me what I need to change (in the source code?) to fix this problem?
Cheers,
The text was updated successfully, but these errors were encountered: