Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
/ Orion Public archive

Feature/105 add tray icon #101

Merged
merged 7 commits into from
May 10, 2018
Merged

Feature/105 add tray icon #101

merged 7 commits into from
May 10, 2018

Conversation

kernelwhisperer
Copy link
Contributor

What changed?

Added tray icon.
Now the app runs in the background when you close all windows, unless you quit from the tray icon.

let appIcon = null
const iconPath = path.join(__dirname, '../docs/logo.png')

function setupTrayIcon () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable here the trayicon on macOS! There is no need for that as the app on that platform will not quit if all the windows are closed.


let appIcon = null
const iconPath = path.join(__dirname, '../docs/logo.png')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs? Maybe? :D

@koalalorenzo
Copy link
Member

If I close the main window i can't see the trayicon on Ubuntu 16.04

screen shot 2018-05-08 at 19 49 54

on macOS (which should be disabled) I see a giant icon :D

screen shot 2018-05-08 at 19 37 59

import { app, Menu, Tray } from 'electron'

let appIcon = null
const iconPath = path.join(__dirname, '../docs/logo.png')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use NativeImage (https://electronjs.org/docs/api/native-image#nativeimagecreatefrompathpath)
This will ensure to have the best graphics and scaled image. AFAIK

@kernelwhisperer
Copy link
Contributor Author

Let me know if the latest commit solves this :)

@koalalorenzo
Copy link
Member

koalalorenzo commented May 9, 2018

It looks like it (I will test it this evening)

The Ubuntu one seems to be a Distro/Configuration-driven situation.

@koalalorenzo
Copy link
Member

By installing it from the dpkg and then running it it works :)

@koalalorenzo
Copy link
Member

dpkg dependencies added to the docs so we know that when running from source the user should install the appindicator/missing pkgs! Ready to merge

@koalalorenzo koalalorenzo merged commit df40101 into master May 10, 2018
@koalalorenzo koalalorenzo deleted the feature/105-add-tray-icon branch May 10, 2018 07:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants