mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-03 10:47:31 +01:00
fix(Linux): setting bar tooltip position
This commit is contained in:
parent
d214c1f35b
commit
6bad032f0d
@ -85,10 +85,12 @@ else {
|
|||||||
|
|
||||||
ipcMain.on('refresh-theme-settings', () => {
|
ipcMain.on('refresh-theme-settings', () => {
|
||||||
const appTheme = persistentStore.get('application_theme');
|
const appTheme = persistentStore.get('application_theme');
|
||||||
mainWindow.setTitleBarOverlay({
|
if(isWindows){
|
||||||
color: appTheme === 'dark' ? '#3f3f3f' : '#fff',
|
mainWindow.setTitleBarOverlay({
|
||||||
symbolColor: appTheme === 'dark' ? '#fff' : '#000'
|
color: appTheme === 'dark' ? '#3f3f3f' : '#fff',
|
||||||
});
|
symbolColor: appTheme === 'dark' ? '#fff' : '#000'
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on('change-window-title', (event, title: string) => {
|
ipcMain.on('change-window-title', (event, title: string) => {
|
||||||
|
@ -98,6 +98,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
dragElement: null,
|
dragElement: null,
|
||||||
|
isLinux: process.platform === 'linux',
|
||||||
isContext: false,
|
isContext: false,
|
||||||
isDragging: false,
|
isDragging: false,
|
||||||
contextEvent: null,
|
contextEvent: null,
|
||||||
@ -129,7 +130,9 @@ export default {
|
|||||||
},
|
},
|
||||||
tooltipPosition (e) {
|
tooltipPosition (e) {
|
||||||
const el = e.target ? e.target : 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`;
|
el.querySelector('.ex-tooltip-content').style.top = `${fromTop}px`;
|
||||||
},
|
},
|
||||||
getStatusBadge (uid) {
|
getStatusBadge (uid) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user