Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

feat: Relates to #413. Add menu item Toggle Always On Top and save the setting#415

Closed
ltfschoen wants to merge 7 commits intomasterfrom
luke-413-menu-toggle-always-on-top
Closed

feat: Relates to #413. Add menu item Toggle Always On Top and save the setting#415
ltfschoen wants to merge 7 commits intomasterfrom
luke-413-menu-toggle-always-on-top

Conversation

@ltfschoen
Copy link
Contributor

No description provided.

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Feb 9, 2019

Update: It now toggles the value of the label shown in the menu Window tab between "Blur on Click" and "Always On Top" depending on what you last toggled it to be

@ltfschoen
Copy link
Contributor Author

Note: On second thoughts, I think the naming of "Blur on Click" isn't very useful.

What do you think about changing it to just "Enable Alway On Top" or "Disable Always On Top"

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 11, 2019

I really think the "Blur on click away" behavior should be the default. Although it can't hurt to give many possibilities to the users, I don't think it's needed to let users to change it as it feels very natural like this. It's the current behavior of any taskbar app I use right now. What do you think?

…tor getIsAlwaysOnTop

* alwaysOnTop is now false by default. To enable it user must go to Fether Menu > Window >
Enable Always On Top

* Blur event indicates that was not able to blur when Always On Top is set to true

* Add comments and refactor getIsAlwaysOnTop
@ltfschoen
Copy link
Contributor Author

ltfschoen commented Feb 17, 2019

@Tbaut Yes I agree. I've pushed commits that:

  • Configures alwaysOnTop to be false so it is disabled and the Fether window blurs when you click away by default.
  • Rename the menu item to display "Enable Alway On Top" or "Disable Always On Top".

I think we should include this Fether menu item. Otherwise users that aren't happy with Always On Top being "disabled" by default will have to resort to using other third-party tools (if any are available) to force the window to be Always On Top.

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 18, 2019

It's probably for another issue but on Linux Mint (cinnamon window manager) I do not have the Menu that appears when pressing alt.

Otherwise the blur on click is working fine now :)

@ltfschoen
Copy link
Contributor Author

@Tbaut As discussed, I'm going to have to revisit this due to a bug when toggling the menu item on Linux

screen shot 2019-02-19 at 3 50 49 pm

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Feb 19, 2019

It's probably for another issue but on Linux Mint (cinnamon window manager) I do not have the Menu that appears when pressing alt.

Otherwise the blur on click is working fine now :)

As discussed, on Ubuntu Gnome, I have to "hold down" the "Left ALT" key and then the menu appears at the top of the screen. However, as you've pointed out it doesn't appear to work consistently on a different Linux OS.

Could you try changing const shouldUseFrame = process.platform === 'win32'; to const shouldUseFrame = true; in fether-electron/src/main/app/options/config/index.js, and then see if you can get the menu to appear on Linux Mint?

If that works I think on all Linux OS (i.e. process.platform === 'linux') we should make the Fether window have a "frame" by default.

And we might have to use methods of the os library to be more granularly configure it to work on different versions of Linux. What does the following return when you run node in the terminal and then copy/paste the following?

import os from 'os';
console.log(os.type());
console.log(os.release());
console.log(os.platform());

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 19, 2019

Could you try changing const shouldUseFrame = process.platform === 'win32'; to const shouldUseFrame = true; in fether-electron/src/main/app/options/config/index.js, and then see if you can get the menu to appear on Linux Mint?

The window now has a frame but the menu is always visible, pressing "alt" doesn't appear to do anything.

console.log(os.type());
Linux
undefined
console.log(os.release());
4.15.0-45-generic
undefined
console.log(os.platform());
linux
undefined

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Feb 19, 2019

@Tbaut Cool thanks, could you try changing const shouldUseFrame = process.platform === 'win32'; to const shouldUseFrame = true; in fether-electron/src/main/app/options/config/index.js, and then see if you can get the menu to appear on Linux Mint?

EDIT: Sorry, I meant to say, could you try changing fetherApp.win.setMenuBarVisibility(true); to fetherApp.win.setMenuBarVisibility(false); in fether-electron/src/main/app/methods/setupMenu.js, and then see if you can get the menu to appear on Linux Mint?

And if that doesn't work, try passing different combinations of true/false to the following two lines

fetherApp.win.setAutoHideMenuBar(false);
fetherApp.win.setMenuBarVisibility(true);

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 19, 2019

Thanks, I had the menu bar hidden at start and showing when pressing "alt" with the following:

  fetherApp.win.setAutoHideMenuBar(true); // Pressing ALT shows menu bar
  fetherApp.win.setMenuBarVisibility(false);

While still having const shouldUseFrame = true

@ltfschoen
Copy link
Contributor Author

Thanks, I had the menu bar hidden at start and showing when pressing "alt" with the following:

  fetherApp.win.setAutoHideMenuBar(true); // Pressing ALT shows menu bar
  fetherApp.win.setMenuBarVisibility(false);

While still having const shouldUseFrame = true

Ok, I'm curious to know if it still works with that configuration when it's "frameless" on Linux Mint. Could you please try changing it again back from const shouldUseFrame = true; to const shouldUseFrame = process.platform === 'win32'; in fether-electron/src/main/app/options/config/index.js

Whilst keeping it set to the following in fether-electron/src/main/app/methods/setupMenu.js:

fetherApp.win.setAutoHideMenuBar(true); // Pressing ALT shows menu bar
fetherApp.win.setMenuBarVisibility(false);

And then see if the menu bar is still hidden at the start and showing when pressing "alt" on Linux Mint?

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 20, 2019

Sorry I should have mentionned it since I tested it yesterday, the frameless brakes the behavior (menu hidden, alt not doing anything). It needs to have the frame to work properly.

We can leave the frame for Linux then..
edit: I would like to keep it frameless, and forget about this AlwaysOnTop

@ltfschoen
Copy link
Contributor Author

Closing this in the interim as we've got higher priorities and this doesn't seem to be a desired feature anyway based on feedback from @Tbaut and @axelchalon in #433

@ltfschoen ltfschoen closed this Feb 21, 2019
@Tbaut Tbaut deleted the luke-413-menu-toggle-always-on-top branch March 27, 2019 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants