icedman / dash2dock-lite

A minimal and animated implementation of dash to dock
GNU General Public License v3.0
187 stars 14 forks source link

Bugs: Display problems 2x scale #111

Closed hachikoharuno closed 2 months ago

hachikoharuno commented 3 months ago

Hello, I’ve actually been following your extension for a long time, since I like it better than dash to dock, but I was waiting for the display problems that are visible in the video to be resolved.

  1. The application menu icon is not displayed correctly
  2. The application cannot collapse into its icon (as I noticed without the magic lamp extension, the application completely collapses into a corner, but misses with it)

Currently using arch gnome 46 Screen resolution 2560x1600(16:10), Scale 200%(The first problem seems to be solved by using 1080p 100%)

https://github.com/icedman/dash2dock-lite/assets/86525501/04ae4174-a4d1-427b-9902-6e9cbff7b8b2

icedman commented 3 months ago

Upon investigating #1, I found some more display - scale problems. 2x scale causes problems with apps icons. And also all icons being misaligned when using layout where dock is not at the bottom. I added temporary hacks to make the other layouts usable at 2x scale.

hachikoharuno commented 3 months ago

I downloaded and installed the development branch and I can say that the situation is really much better, now the application, when minimized, more believably collapses into its own icon in the dock. However, the application menu button is still slightly uneven and slightly overlaps the icons and has more indentation than other icons.

https://github.com/icedman/dash2dock-lite/assets/86525501/fc5d0ea4-4543-40de-b2a2-bbaad017788a

hachikoharuno commented 3 months ago

I also noticed that the context menu that opens when you right-click is lower than it should be.

screen

MarsSwimmer commented 3 months ago

the same style bug, when apps icon at left, right and left margin is so wired, see: 截图 2024-04-03 02-38-35

And sometimes click to open application doesnt work, may cause dock block, sometimes cause screen block,

Ubuntu 23.10 Gnome 45 Wayland and X11 also can see that

icedman commented 3 months ago

Please also indicate the release version of Dash2Dock Animated. So that I would know if the fixes I've done have been applied in your tests.

MarsSwimmer commented 3 months ago

dash to dock animated version 54, download from gnome extension: https://extensions.gnome.org/extension/4994/dash2dock-lite/

icedman commented 3 months ago

I had some recent pushes on the development branch for this bug.

hachikoharuno commented 3 months ago

hmm, now the "Apps icon" button doesn't accept the gnome shell theme and I can't be sure that everything is even now, since there icon theme and gnome shell theme were from the same place and you can be sure that the icons are the same size. But here is the minimizing windows, minimizes past its icon. I've also tried disabling icon animation to avoid, which only seems to me to be the case. Attached is the video.

https://github.com/icedman/dash2dock-lite/assets/86525501/8742cbff-23b9-4aca-be17-163ae97a3b4d

icedman commented 3 months ago

Is the alignment fixed though?

Please file compiz lamp compatibility as another issue. So we can fix one byug at a time.

hachikoharuno commented 3 months ago

Yes, Okay, I understand. I can't check the alignment because the "apps icon" button doesn't accept the gnome-shell theme. As in previous videos, there should be an icon from mac os, and not the default one. Could you please move it back to the development branch? then I can say for sure.

hachikoharuno commented 3 months ago

I think the problem is solved. If you focus on the markings in the visual indicators mode, then everything is smooth and displayed correctly. Great! Thanks for your hard work.

dash

icedman commented 3 months ago

The apps icon is actually a button. I've changed it DashIcon sa that it behaves the same with all other icons. We will deal with theme in a bit.

icedman commented 3 months ago

You can turn on debug visual indicators.. so that you can check alignment.

icedman commented 3 months ago

I could see from your.shot. that the apps icon is centered.are you at 2x scale?

hachikoharuno commented 3 months ago

Yes, I have a 2x scaling.

icedman commented 3 months ago

What is your shell theme? How do you install it. (I very seldom use shell themes)

hachikoharuno commented 3 months ago

I just took the whitesur theme and took the application icon from there, removed everything else. Accordingly, I have everything as default, except for the “apps icon”.

hachikoharuno commented 3 months ago

This is what a screenshot looks like with the shell theme and default icons turned off.

default

icedman commented 3 months ago

I just took the whitesur theme and took the application icon from there, removed everything else. Accordingly, I have everything as default, except for the “apps icon”.

I'm not sure what you mean. I never use theming scripts. Perhaps you could run your theme script again. Or use the whitesur theme as-is.

hachikoharuno commented 3 months ago

I don't quite understand what exactly is wrong with the first screenshot. The shell theme is just a css file. So I re-enabled the theme.

theme

icedman commented 3 months ago

the icon theme should apply then. i used view-app-grid, nothing special.

icedman commented 3 months ago

I tested with several themes. The Apps icon changes correctly. Some have circles for grid, others square. I also downloaded the WhiteSur theme. The icon however only displays black/white.. I changed the icon from "view-app-grid-symbolic" to simply "view-app-grid". Please re-check.

hachikoharuno commented 3 months ago

I still have the default icon, although the icon in the standard dash changes.

hachikoharuno commented 3 months ago

I also want to note that the icon should not be taken from the icon theme, but from the shell theme (This happened due to the fact that themes are designed to work without extensions, and in the default gnome you cannot change the icon only by replacing the icon pack). I can provide you with the css code that changes this icon, it would probably be a solution to somehow take the icon from a css class, although I don't understand much about it, it worked correctly before.

.show-apps .show-apps-icon {
  color: transparent !important;
  background-image: url("assets/view-app-grid.svg");
  background-size: contain;
}
hachikoharuno commented 3 months ago

I looked at the code, if I understood correctly, you completely changed the way the “show apps” button is displayed, in order to fix the display bug, since usually icon themes do not contain icons for a given object, you need to either allow the path to the icon to be specified in the extension settings, or extract using javascript - background-image from div - "show-apps-icon"

I still don't understand development, just a guess.

icedman commented 3 months ago

.show-apps .show-apps-icon I'll add these so that the icon can work with your themes

icedman commented 2 months ago

Did a coding binge last night to fix these 2xScaled bug. Please checkout the development branch.

hachikoharuno commented 2 months ago

The applications button still doesn't change from changing the shell theme. But the context menu is now displayed correctly.

screenshot

icedman commented 2 months ago

applications button ... I did some experimentation. Shell theme with background-image override is not supported at the moment. Because dynamic icon scaling cannot be controller easily. I might just a a way to override the icons. - it is a feature request any way.

hachikoharuno commented 2 months ago

Yes, great, you still did a good job. But what do you think about adding an icon selection setting? I don't think it's necessary to use the icon from the shell theme. In one of the previous versions, I manually changed the icon to one of the icon pack, and it worked fine.

icedman commented 2 months ago

Yes, great, you still did a good job. But what do you think about adding an icon selection setting? I don't think it's necessary to use the icon from the shell theme. In one of the previous versions, I manually changed the icon to one of the icon pack, and it worked fine.

Yes. This is a similar request a while back. It will be a nice feature.

icedman commented 2 months ago

@hachikoharuno Please read README.md for custom icons feature. And tell me if this solution works for your system. (Still experimental)

hachikoharuno commented 2 months ago

I tried everything, but I never managed to make the icons work. I downloaded the development branch. For some reason, they do not change and do not overlook. I tried both my badges and already available in the topic. For example, I tried the "Mega" icon for verification, however, if you look at the logs, the "Show-Apps" button did not react at all, but for the TRASH icon, the icon of the seems loaded, but is not displayed.

Here's what is written in the logs:

Icon created: view-app-grid-symbolic
Icon created: mega

The contents of the "icons.json" file are:

{
  "icons": {
     "view-apps-grid-symbolic": "mega",
     "user-trash": "mega"
  }
}

The icon theme is used by whitesur, I also tried placing icons in both /usr/share/icons and ~/.local/share/icons.

I also tested using my themes in the dash2dock extension itself (which works via export) to check if I have access to the d2da folder and it works.

screenshot: test

icedman commented 2 months ago

Your mega.svg. Should be somewhere in the icon theme folder.. where the theme is installed

/usr/share/icons/whitesur/apps/scalable/mega.svg

Or at the /usr/share/icons/adwaita which is the fallback icon set (at least on my system)

hachikoharuno commented 2 months ago

Yes, of course it is there. Снимок экрана от 2024-04-26 20-00-41

icedman commented 2 months ago

"view-apps-grid-symbolic" ... remove the 's' "view-app-grid-symbolic"

icedman commented 2 months ago

Also try this in looking glass Main.overview.d2dl.icon_map['view-app-grid-symbolic'] = 'mega'

hachikoharuno commented 2 months ago

Yes, after I removed the extra "s", the "show-apps" icon now works and takes on the icon theme.

However, I want to note that for your own icon to work, you need to place it not only in .local/share/icons/WhiteSur-dark/apps/scalable, but also copy it from there to the .local/share/icons/WhiteSur-dark/mimes/scalable , otherwise it won't work. I think you should note this in the instructions in README.md

But the trash can icon still doesn't change.

And I don't understand what needs to be done with Main.overview.d2dl.icon_map['view-app-grid-symbolic'] = 'mega' could you please explain. Снимок экрана от 2024-04-27 09-47-19

icedman commented 2 months ago

Your trash is full.. The icon for that is "user-trash-full". So add another entry for "user-trash-full": "mega"

Gnome has a development tool called looking glass. Press Alt+F2 to popup "Run Command". And type lg. Then type this:

Main.overview.d2dl.icon_map['view-app-grid-symbolic'] = 'mega'

or this:

Main.overview.d2dl.icon_map['user-trash'] = 'mega'

icedman commented 2 months ago

I think gnome-shell has some icons caching.. You probably need to logout. Or to change to another icon theme and back to WhiteSur for your custom icons to be picked up.

hachikoharuno commented 2 months ago

Yes, now everything is completely working! This is very cool. All icons are changed using icons.json. The commands in looking glass also work.

Just in case, I’ll write the contents of the icons.json file:

{
  "icons": {
     "view-app-grid-symbolic": "show-apps",
     "user-trash": "0ad",
     "user-trash-full":  "mega"
  }
}

I wrote random icons only for testing. For the "show-apps" button, I placed my show-apps.svg icon in two places: ~/.local/share/icons/WhiteSur-dark/apps/scalable/show-apps.svg ~/.local/share/icons/WhiteSur-dark/mimes/scalable/show-apps.svg

P.S As far as I understand from the logs, the extension caches icons every time it is turned on, so just restarting the extension is enough, no need to log out.

A screenshot of everything working: Снимок экрана от 2024-04-27 13-50-32

icedman commented 2 months ago

I've added a way to use icon files instead of icon names. Please check the README for update. Basically, save your icons at ~/.config/d2da/icons folder.

And use filenames instead of icons names like:

{
  "icons": {
     "view-app-grid-symbolic": "icons/show-apps-icon.svg",
     "user-trash": "icons/my-own-trash.svg",
     "user-trash-full": "icons/my-own-trash-full.svg"
  }
}

This is probably easier for most users.

hachikoharuno commented 2 months ago

Yes, everything works great. I took a random SVG image that I had to keep the icons from repeating.

I agree with you that it will be easier for users.

icons.json:

{
  "icons": {
     "view-app-grid-symbolic": "icons/checkbox.svg",
     "user-trash": "icons/checkbox.svg",
     "user-trash-full":  "icons/checkbox.svg"
  }
}

Screenshots:

Снимок экрана от 2024-04-27 21-47-59 Снимок экрана от 2024-04-27 21-48-14