-
-
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 |
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. |
Nice! Now we just need to find some highres or vector icons for the various buttons! |
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) ? |
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 |
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! |
With lots of tools being added, please don't fall into a feature creep mode |
This looks damn nice! 😃 👍 |
When using such tool, it's often useful to highlight several regions - meaning, to dim everything except several regions. If you apply it one region at a time, the result would be different |
That is a plan. You draw as many rectangles as you want and everything outside them is dimmed. I think that's a cool feature. |
Not so sure these news is very good :) Do you mean that for some reason it's slow on X11? |
I wasn't sure it would run on Wayland at all, that's why :) . But, no, it's not slow on Xorg when drawing on downscaled 4k images on my slow computer. Drawing on 8k is too slow and probably requires a dedicated GPU. |
I think we should just add a dimming slider to our widget toolbar. It's much much easier than adding a separate tool. |
Nice! Does the dimming work with rectangles only or with all kind of shapes? If with rectangles only, I'd propose to make a new tool/button for it. Then only show the dimming slider which this tool is active. |
That's a good idea! What about the way Xournal++ solved this: A button with a dropdown arrow next to it. When clicking the button, the curretly active shape is activated. In the dropdown menu the shape can be changed. When changed, it also alters the tool's icon. Another click on the button disables the shape tool (and reverts to the freehand tool). I need to add that the shapes are treated as a modifier to the freehand tool there, though, not as distinct tools.
I like the way you implemented it very much! Sorry for not pointing that out earlier! |
From the pictures you posted, it looks nice, but we can give more meaningful feedback once we're able to touch the new UI ourselves |
I didn't know Xournal++ existed. Wow. I think that you've just killed my motivation to continue with this application. |
Do you mean the screen resolution or the image resolution? I think, they should look the same on a given screen, independent of the image size and the zoom level. But they should probably have more pixels on a high resolution screen to be equally well visible. Another minor thing that I stumbled upon: When saving a file, it should propose the filename of the currently edited file (possibly with some suffix or prefix to prevent accidental overwriting). Also the confirmation message after saving is rather unusual. Some apps show an asterisk in the window name when a file has unsaved changes, which disappears after saving. Don't know how hard this is to implement, but I think, that would be more convenient than a confirmation message on saving. |
For some reason the video in latest post doesn't open for me. But I think that size of handles shouldn't change with zoom, but should be the same number of pixels on screen, regardless of current zoom of the picture. Basically, agreeing with @Photon89
Sorry, I don't. When one ever needs to change the handle's size? Only if it's wrong. If you really want it to be configurable, just put it to settings. But if it's a good size from the start (and doesn't change when you zoom) there's no need for that either. I've noticed that every manual drag event creates many items in the undo list, which makes it painful to actually undo anything. I needed to hold Ctrl-Z for many seconds watching how my triangles are changing size in reverse :) And while doing that, I see a shadow of the original shape together with the one being unresized. In fact, if I unpress Ctrl-Z while the shadow is visible, I now get both these shapes, and can resize them separately! In the text tool, have you tested it only with ASCII characters? I can't type anything in Cyrillic. What's the point of triangle, tetragon and pentagon? It feels like you implemented an arbitrary polygon (I haven't checked, maybe you didn't), but for some reason decided only to make it possible to do these numbers of corners Another issue: if the image doesn't fit the window, and scrollbar is visible, and it's actually scrolled, the mouse coordinates are off. |
Screen resolution shouldn't matter for this at all, only its DPI. Handles on small image should be the same as handles on a large image, so image resolution also shouldn't matter |
That's a good point, it should be possible to calculate a good handle size by multiplying some suiting value with the DPI value. |
Ah, missed it, sorry
I didn't try to. Sorry if I sound too hard, my intention was to test and report bugs to you.
It's easily possible that the old drawing tool doesn't do the right thing either. |
Yeah, it's possible, but I don't have a clue how to do that. Until you guys "calculate a good handle size by multiplying some suiting value with the DPI value" I'll be using handle size slider. I love it. |
looking at the code, please don't do this |
Do we do anything related to DPI in Shutter itself, actually? If so, maybe this can be adapted to the drawing tool? Something like this:
|
The |
Unless you use Wnck library, you won't need any of that. Shutter uses Wnck to enumerate list of windows to take screenshot of a single window.
Just to clarify: I'm not blaming you, not attacking, etc. My comments were to raise your awareness about certain issues with the product or the code which I've noticed, so that these issues can be fixed, and therefore product improved (it's hard to fix something if you don't know about the issue, right?). I understand this is alpha version, and not expecting everything to work perfectly yet. While I "know" perl, I can't say I'm a good perl programmer. Seeing you writing this annotator tool, I think you're not any worse perl programmer than me. Shutter codebase is not very good codebase either, I wouldn't recommend using it to learn how to write Perl code :\ That's one of reasons why I started the Rust port a while ago, though never got after proof of concept stage yet. |
By "any of that" I meant wnck_screen etc. Probably |
😂 |
Nice! I think, it is customary to add the extension to the proposed file name. Like "annotation.png" instead of just "annotation". Also, what about including the original background image's name? For example, of I open "image.png" for annotation, then it could propose "image_annotated.png" as default save name. I noticed that zooming with Ctrl + scroll doesn't work, but possibly I am using outdated an outdated code snapshot. Regarding the handle size, I experimented with |
From what I understand, zooming as part of the image is how it's currently implemented |
Yes, what I meant is, how it looks and feels for the user, at least in similar apps that I know of. |
Oh, I guess, I used an outdated code snapshot where the handle size scaled with the image when zooming the image. Sorry for the confusion! So the handles don't change their size when zooming in and out? I was wondering whether you intend to create a project/repository for Image Annotator, so it is easier to grab the most recent version? |
It's "3. Something else"
You made it 10 pixels of image. They should be 10 (or however many) pixels of screen. The primitive itself of course should scale together with the image zoomed. But the handles size should stay constant on screen, independent from the image zoom level. In the screen space handles should stay the same size always. But if you insist on using image space (apparently, you do, not sure why), then the relative size of handles should change with zoom, so that they stay the same in screen space. |
Oh, you mean like in Ksnip? Oh, yeah, sure. Now I understand. I didn't understand before because the Shutter Drawing Tool handles do not stay the same independent from the image zoom level. They scale/resize together with the image and the primitive they are attached to. But, no problem, now I know what you guys mean. Why is that not implemented in Shutter's DrawingTool? |
I guess that's because you are drawing both the primitive and its handles on the image itself, allowing that to be zoomed together with the image. I see 2 solutions:
|
You haven't seen my answer :) |
I don't know what it does. Possibly?
yeah, again, I'm not saying that the old tool is very good. And I don't know whether the wrong behavior was there from the start, or when I was porting Shutter to Gtk3 I'm still surprised you decided to reuse some part of the old codebase |
It does exactly what you want. The handles stay always the same, they have the same size, independent of image zooming. |
Indeed, I never noticed that!
Xournal++ also does it this way. |
Handle size slider still works and if you increase or decrease the size of the handles their new size will still stay same on screen regardless of zooming :) |
Nice! The screenshots look good! |
Cool!
Is it still necessary though? :P If it is, I suggest hiding it in settings to preserve some space on the toolbar, since changing the size isn't needed very often |
Also I suggest trying HiDPI mode to decide whether the size of the handle needs to be multiplied by the current dpi scale or not |
Ah ok, I thought you said there's not enough space. |
Well, you need to consider people with other screen sizes too, not just yours |
Great!
Just this phrase itself: "I thought it wasn't because I was running hiDPI. Now when I run native 4k thre is a lot of space in the toolbars." Because if someone else runs hidpi and not native 4k screen, will they not have much space in the toolbars again?
Ah, interesting |
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: