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

Implement an option to hide text for anchors if icons are selected. #181

Closed
gileli121 opened this issue Dec 30, 2021 · 52 comments
Closed

Implement an option to hide text for anchors if icons are selected. #181

gileli121 opened this issue Dec 30, 2021 · 52 comments
Labels
done enhancement New feature or request

Comments

@gileli121
Copy link
Member

No description provided.

@gileli121 gileli121 added enhancement New feature or request in-progress labels Dec 30, 2021
@gileli121
Copy link
Member Author

Preview:
anchor_hide_text_demo

@jakkaas
Copy link

jakkaas commented Dec 31, 2021

It's looking perfect.

@jakkaas
Copy link

jakkaas commented Jan 3, 2022 via email

@cpasoft
Copy link

cpasoft commented Jan 3, 2022

With this beta, the icons are not moving away from the text, are they?

@gileli121
Copy link
Member Author

gileli121 commented Jan 3, 2022

@cpasoft
It broke in this version.
I was not supposed to upload it.
Too much stuff broke there.

It will take more 1-3 days to finish this feature

@gileli121
Copy link
Member Author

@jakkaas
I did not understand you but anyway something indeed got broken with the auto arranging algorithm so now they are not automatically moving anymore.
As I said, I did mistake in this version.. I broke it

@cpasoft
Copy link

cpasoft commented Jan 3, 2022

It's not problem to me... This is why it is called "beta version"...
Good work, I like this new feature... and please, not stop to uploading beta versions... we will help you reporting bugs and testing things...
Regards!

@gileli121
Copy link
Member Author

Thanks.
I will continue to upload beta versions but I will try to avoid too much broken versions like the last one :)

@gileli121
Copy link
Member Author

gileli121 commented Jan 3, 2022

@cpasoft / @jakkaas
After more hours of work, I got this result:
image
anchor_icon_only_demo1

I added these options:
image
image

If you select "By Size", it will make the anchors of the most recent used windows to be bigger relative to other anchors.
This is the method I use when we see only icons..
You can customize the max scale size (default is 2x) and for how many anchors you want to do it. The default is 3.

Given these configuration, if we have this windows:

Window 1 - Used just now
Window 2 - Used before window 1
Window 3 - Used before window 2
Window 4 - Used before window 3

Then you should see that:

  • Anchor of window 1 will be bigger by multiple of 2
  • Anchor of window 2 will be bigger by multiple of 1.3
  • Anchor of window 3 will be bigger by multiple of 0.6
  • Anchor of window 4 will be in regular size. it will not scale it because you chose 3 in the settings.

It is a little complex stuff but hope that you got the idea :)

See the gif.

I uploaded here new beta version:

@cpasoft
Copy link

cpasoft commented Jan 3, 2022

Great!.... Download and testing!!!. Thanks Gileli

@cpasoft
Copy link

cpasoft commented Jan 3, 2022

First test... The emphasys scale it's working great. I've setted as 1.68x.
Now, the icons are moving away from the text again... Everything seems to work fine by now... I'll be testing this days, and I'll report you any problem I could find
Great job my friend!

@gileli121
Copy link
Member Author

gileli121 commented Jan 4, 2022

Great!
I also planning to improve a little the auto position algorithm so that when it moving the icons/anchors, it will try to move them in groups. I mean that it will try to avoid from moving them all over the screen. They will be more close to each other when it is possible.

I also optimized the algorithm in the last beta - auto position should work faster or should take less CPU resources because I removed unnecessary recursions. before the optimization, It basically calculated the same auto-positions multiple times. Now it will not do it and work more efficient

Edit:
I decided that I will not change the auto position algorithm more. It works good enough

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

I think the position algorithm is good enough, at least for me...
Moving anchors in groups would not be nor easy nor efficient in my opinion. I think it is better to move it separately as now.
The new scaling system and the Dynamic opacity together are working awesome...

imagen

@gileli121
Copy link
Member Author

@cpasoft
I edited the previous message and I wrote that I decided to not change the auto-position algorithm because I also think that it works good

The new scaling system and the Dynamic opacity together are working awesome...

Great to hear!

But I think that maybe there are problems when the DPI scaling is above 100% and I did not handle it yet.
In your screen resolution settings, you have more than 100% scaling/DPI?

I will test it also and see how it works with multiple monitors and more than 100% scaling

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

On the contrary, I have it below 100%. At this moment, I have it at 83% in a 1920x1080 screen.
Now I've setted to 140% and seems to work right... here an snapshot...
imagen

My settings are:
5 anchors in total, Visibility configuration, 3 anchors, icon extra scale 1.92x, show only icon, dynamic opacity on and minimum opacity 21%.
Size:
imagen

The same configuration in my other screen (1440x900) shows as:
imagen

If you want that I try something specific, just let me know...

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

Maybe a relative size depending of the real screen resolution would be great, but I don't know how difficult it might be.

@gileli121
Copy link
Member Author

As you already saw, "difficult" is nothing for me.
Implementing this feature requires a lot of knowledge that I have so you don't have to use this word here

I thought to implement something else:
If you have 2 icons or more that are the same icons, it will show the text also when the mouse not above them, and for the other cases it will show only the icon.

what do you think?
I will call it: "Show window title for duplicate icons"
And you can enable/disable this behavior.

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

Interesting... so if you have, for example, two editors on background, only appears one icon and the name of the edited files next to this single icon... right?
In this example, both editors count as 1 anchor?... I mean, if you have 6 backgrounds windows, you will have 5 icons or just 4, but one of them with text??

@gileli121
Copy link
Member Author

No, both editors will get each one another anchor.
But because 2 anchors show the same icon (because they use the editor icon), the idea is to show only for these 2 anchors also the text and not only the icon.

Because this way you can tell more easily which belongs to which window.
If all icons are different, it is easy to know by the icons..
But if you have multiple icons that are the same, you can't tell it unless the mouse above the icon (and then you see the text).
So I suggest that in these cases of duplicate icons - show always the text in addition to the icon

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

I'll try to explain it better...

Maybe a relative size depending of the real screen resolution would be great, but I don't know how difficult it might be.

It's usual to have two or more screen in the same computer, and every one might have different resolution. As it stands now, you will have small icons in one screen, but big in the other... It would be great to have the "same visual size" (more or less) in all screens...

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

No, both editors will get each one another anchor.

Understood!... I like it!

@gileli121
Copy link
Member Author

gileli121 commented Jan 4, 2022

I'll try to explain it better...

Maybe a relative size depending of the real screen resolution would be great, but I don't know how difficult it might be.

It's usual to have two or more screen in the same computer, and every one might have different resolution. As it stands now, you will have small icons in one screen, but big in the other... It would be great to have the "same visual size" (more or less) in all screens...

This is why DPI settings invented.
You just need to configure it in WIndows settings.
You can set multiple different DPIs for different monitors

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

This is why DPI settings invented.

Yes, I know, but i don't want to lose space on my bigger resolution screen. I don't want to make the text and the rest of the environment bigger to see the WindowTop icons in the same size in all screens.

Maybe my poor English it is not enough to explain what I have to say... Sorry about that...

@gileli121
Copy link
Member Author

@cpasoft
I see. But maintaining scaling settings per each DPI is a little difficult.. (haha.. I told that you should not use the word and now I use it myself).

I can make option to ignore the DPI scaling so that if the option enabled, the icons will not scale up with the DPI.
What do you think?

@cpasoft
Copy link

cpasoft commented Jan 4, 2022

It could be a solution. Anyway, it is not a big problem...
Thanks Gileli... ;-)

@gileli121
Copy link
Member Author

You are welcome :)
There ware minor DPI issues that I just fixed.
Now I will continue to implement the behavior I talked about (show text for duplicate icons)

@gileli121
Copy link
Member Author

gileli121 commented Jan 5, 2022

@cpasoft
I added now this option:
image

This is what it does:
image

Please check this beta version:

Let me know how it works.
I could broke a lot of stuff again so it will help if you test it.

Thanks :)

@cpasoft
Copy link

cpasoft commented Jan 5, 2022

First test, by now it seems to work everything ok...
The anchors keep away from text. If you have 2 or more open documents with the same app it shows the text next to the icon. The scale and the opacity seems to works right...

imagen

I have a suggestions about this topic:
-> Allow user to select the default icon instead of the big dot there is now (when there is no icon for the app, for example, setup's windows or something like that).

Another question... How do you choose the black theme for the WindowTop. I have it on gray, and the context menu it is awful...
imagen

Edit: Ok, you must to change the windows theme for this. I suggest allow to the user set the theme manually from WindowTop.

And again, Thank you! good work. :-)

@cpasoft
Copy link

cpasoft commented Jan 5, 2022

Problem detected:
The keep away from text is not working on the Desktop Telegram Application.
I have tested on the stable version as well, and it seems to not work either, so it is not a problem with the new features.
I don't know why it is not working with this specific application... Maybe should I open a new topic for this??

Edit:
It is not working with notepad nor notepad ++ either...
imagen
imagen

@cpasoft
Copy link

cpasoft commented Jan 5, 2022

Another thing... I don't know if this behaviour is right.
If you have two documents open with the same app, but only one is on background, the text is showing.
Also, if you have two documents, and one is minimized, the other one is also showing the text.

Snapshot to explain it:
imagen
I had only one document open in background, but the text is showing...

@gileli121
Copy link
Member Author

@cpasoft
This is a bug.
It should show the text only if there is more than 1 icon that is the same.

Do you know how to reproduce it?

About the issues with notepad and notepad++, I know that it is not perfect. It will miss some stuff sometimes.
But for the most part, it correctly detects texts/images to stay away from.

I can suggest you configure a hotkey for toggling the anchors ON/OFF here:
image

This hotkey will enable/disable it so you can quickly disable it when it does not work right

@cpasoft
Copy link

cpasoft commented Jan 5, 2022

@cpasoft This is a bug. It should show the text only if there is more than 1 icon that is the same.

Do you know how to reproduce it?

It's incredible, I cannot reproduce it again...
But it happened to me this morning...
I'm still testing it... If I can find a way to reproduce it, I'll let you know

@gileli121
Copy link
Member Author

@cpasoft
I also reproduced it only once and I don't know how it happened.
I think that it works good enough for release. I am right?
About the issue with notepad and notepad++, maybe these is still way to fix it.
But it is extra logic to add to the algorithm.

It is probably because the algorithm sometimes fails to get information about where the texts/images showing on the screen and as a result, it fails to move the icons away from the texts/images.

@gileli121
Copy link
Member Author

gileli121 commented Jan 6, 2022

@cpasoft
I found way for the algorithm to work better with notepad++ and notepad.
I will modify the algorithm and implement it today or tomorrow

Edit:
On second thought, it may fix issues with notepad++ but create issues with other programs. So I don't have plan yet.

@gileli121
Copy link
Member Author

@cpasoft
I was able to reproduce the bug now.
I found how to reproduce it

@gileli121
Copy link
Member Author

gileli121 commented Jan 6, 2022

New beta version with fixes for:

  • Bug that sometimes it shows the text anyway even if there is one icon (not duplicate)
  • Bug that sometimes the anchors are located above the other

@gileli121
Copy link
Member Author

gileli121 commented Jan 6, 2022

New beta:

  • Anchor default settings changed to:
  • Dynamic Opacity: Enabled with minimum 5% opacity
  • Show only icon: Enabled
  • Show text for duplicate icons: Enabled
  • Emphasis Method: By Size (Show the icon bigger for recent used windows..)
  • Anchors amount: Unlimited
  • Fixed (again) bug with the auto position algorithm that sometimes the anchors moved to above other

@cpasoft
Copy link

cpasoft commented Jan 6, 2022

Great!, Many improvements today...
I'm downloading the new beta 5 and testing...
I'll Let you know what I see...

Thanks Gileli... :-)

@gileli121
Copy link
Member Author

gileli121 commented Jan 6, 2022

You probably noticed that the opacity of the anchors changed after some delay.
I fixed the issue in beta 6:

@gileli121
Copy link
Member Author

gileli121 commented Jan 7, 2022

Fixed in beta 7 issue that in case of UWP apps, it showed the icon when there are 2 windows from 2 different UWP apps.
It detected different UWP apps as windows from one app so it started to show the text when you have more than one UWP window anchor visible.

Before:
image

Now:
image

Download:

@gileli121
Copy link
Member Author

First gif:
anchors_demo

@gileli121
Copy link
Member Author

gileli121 commented Jan 7, 2022

In beta 8 I improved the user interface of the anchors configuration and added real time preview:
anchor_settings_demo

Download:

@cpasoft
Copy link

cpasoft commented Jan 7, 2022

In beta 8 I improved the user interface of the anchors configuration and added real time preview

Great improvement!... Thanks...
Downloading...

@gileli121
Copy link
Member Author

Thank you!
I am waiting to see how it works for you.

I think that we are getting close to next release (not beta) :)

@cpasoft
Copy link

cpasoft commented Jan 7, 2022

Working very well. Just a minor detail, in preview window always shows 5 icons, no matter how many have you selected on the maximum anchors amount selector.

@gileli121
Copy link
Member Author

This is minor and a little hard to add also this to the preview.
It is not worth the effort.
I think that it is good enough

@gileli121
Copy link
Member Author

Just found regression with the option "Always show window title for duplicate icons".
I almost released it as a stable version...
There is an issue now that this behavior not working fine anymore

@gileli121
Copy link
Member Author

@cpasoft @jakkaas
Released as v5.7.8
Download from here:
https://github.com/BiGilSoft/WindowTop/releases/tag/v5.7

Enjoy!

@gileli121
Copy link
Member Author

@cpasoft
Do you think that the new default settings are fine?

@gileli121
Copy link
Member Author

@cpasoft
Maybe it is possible to fix this issue:
image
image

@gileli121
Copy link
Member Author

@cpasoft
Please write comment in
#194
If you want that I will give it priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants