Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
b542edc6
Commit
b542edc6
authored
Oct 25, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix left mouse button tray behavior and tray icon
parent
35a906bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
main.ts
Breeze.UI/main.ts
+23
-22
No files found.
Breeze.UI/main.ts
View file @
b542edc6
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
const
app
=
electron
.
app
;
const
app
=
electron
.
app
;
// Module to create native browser window.
// Module to create native browser window.
const
BrowserWindow
=
electron
.
BrowserWindow
;
const
BrowserWindow
=
electron
.
BrowserWindow
;
const
nativeImage
=
require
(
'electron'
).
nativeImage
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
url
=
require
(
'url'
);
const
url
=
require
(
'url'
);
...
@@ -181,36 +182,36 @@ function createTray() {
...
@@ -181,36 +182,36 @@ function createTray() {
const
Menu
=
electron
.
Menu
;
const
Menu
=
electron
.
Menu
;
const
Tray
=
electron
.
Tray
;
const
Tray
=
electron
.
Tray
;
let
appIcon
=
null
;
let
trayIcon
;
var
iconPath
if
(
os
.
platform
()
===
'win32'
)
{
if
(
serve
)
{
iconPath
=
'.
\\
src
\\
assets
\\
images
\\
breeze-logo-tray.ico'
;
}
else
{
iconPath
=
path
.
join
(
__dirname
+
'
\\
assets
\\
images
\\
breeze-logo-tray.png'
);
}
}
else
{
if
(
serve
)
{
if
(
serve
)
{
iconPath
=
'./src/assets/images/breeze-logo-tray.png'
;
trayIcon
=
nativeImage
.
createFromPath
(
'./src/assets/images/breeze-logo.png'
)
;
}
else
{
}
else
{
iconPath
=
path
.
join
(
__dirname
+
'//assets//images//breeze-logo-tray
.png'
);
trayIcon
=
nativeImage
.
createFromPath
(
'./assets/images/breeze-logo
.png'
);
}
}
}
appIcon
=
new
Tray
(
iconPath
);
let
systemTray
=
new
Tray
(
trayIcon
);
const
contextMenu
=
Menu
.
buildFromTemplate
([{
const
contextMenu
=
Menu
.
buildFromTemplate
([
{
label
:
'Hide/Show'
,
label
:
'Hide/Show'
,
click
:
function
()
{
click
:
function
()
{
mainWindow
.
isVisible
()
?
mainWindow
.
hide
()
:
mainWindow
.
show
();
mainWindow
.
isVisible
()
?
mainWindow
.
hide
()
:
mainWindow
.
show
();
}
}
}]);
}
appIcon
.
setToolTip
(
'Breeze Wallet'
);
]);
appIcon
.
setContextMenu
(
contextMenu
);
systemTray
.
setToolTip
(
'Breeze Wallet'
);
systemTray
.
setContextMenu
(
contextMenu
);
systemTray
.
on
(
'click'
,
function
()
{
if
(
!
mainWindow
.
isVisible
())
{
mainWindow
.
show
();
}
if
(
!
mainWindow
.
isFocused
())
{
mainWindow
.
focus
();
}
});
app
.
on
(
'window-all-closed'
,
function
()
{
app
.
on
(
'window-all-closed'
,
function
()
{
if
(
appIcon
)
appIcon
.
destroy
();
if
(
systemTray
)
systemTray
.
destroy
();
});
});
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment