Skip to content

Commit

Permalink
fix(Linux): setting bar tooltip position
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Jun 11, 2022
1 parent d214c1f commit 6bad032
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ else {

ipcMain.on('refresh-theme-settings', () => {
const appTheme = persistentStore.get('application_theme');
mainWindow.setTitleBarOverlay({
color: appTheme === 'dark' ? '#3f3f3f' : '#fff',
symbolColor: appTheme === 'dark' ? '#fff' : '#000'
});
if(isWindows){
mainWindow.setTitleBarOverlay({
color: appTheme === 'dark' ? '#3f3f3f' : '#fff',
symbolColor: appTheme === 'dark' ? '#fff' : '#000'
});
}
});

ipcMain.on('change-window-title', (event, title: string) => {
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/TheSettingBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
data () {
return {
dragElement: null,
isLinux: process.platform === 'linux',
isContext: false,
isDragging: false,
contextEvent: null,
Expand Down Expand Up @@ -129,7 +130,9 @@ export default {
},
tooltipPosition (e) {
const el = e.target ? e.target : e;
const fromTop = window.scrollY + el.getBoundingClientRect().top - (el.offsetHeight / 4);
const fromTop = this.isLinux
? window.scrollY + el.getBoundingClientRect().top + (el.offsetHeight / 4)
: window.scrollY + el.getBoundingClientRect().top - (el.offsetHeight / 4)
el.querySelector('.ex-tooltip-content').style.top = `${fromTop}px`;
},
getStatusBadge (uid) {
Expand Down

0 comments on commit 6bad032

Please sign in to comment.