Skip to content

Commit

Permalink
fixed positioning and styling issues for color picker. Issue #14 and …
Browse files Browse the repository at this point in the history
…Issue #15
  • Loading branch information
nkolba committed Apr 15, 2022
1 parent 8d079ba commit 8c4d123
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/main/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const SEARCH_RESULTS_PRELOAD = join(
'../../preload/dist/searchResults/index.cjs',
);

const CHANNEL_WINDOW_WIDTH = 130;
const CHANNEL_WINDOW_HEIGHT = 90;

export class Workspace {
constructor(config?: WorkspaceConfig) {
this.id = utils.guid();
Expand Down Expand Up @@ -383,8 +386,8 @@ export class Workspace {
console.log('creatChannelWIndow');
return new Promise((resolve, reject) => {
this.channelWindow = new BrowserWindow({
height: 100,
width: 140,
height: CHANNEL_WINDOW_HEIGHT,
width: CHANNEL_WINDOW_WIDTH,
hasShadow: true,
show: false,
frame: false,
Expand Down Expand Up @@ -436,7 +439,7 @@ export class Workspace {
});
const winPos: number[] = this.window ? this.window.getPosition() : [0, 0];
this.channelWindow.setPosition(
winPos[0] + (xOffset || 0),
winPos[0] + ((xOffset || 0) - CHANNEL_WINDOW_WIDTH),
winPos[1] + (yOffset || 0),
);
this.channelWindow.show();
Expand Down

0 comments on commit 8c4d123

Please sign in to comment.