-
Notifications
You must be signed in to change notification settings - Fork 224
feat: add tab switch to hide pages and sidebar #560
Conversation
I don't see the necessity for the underline to highlight the active icon in addition to the color |
Also, if there are options to toggle pages and the elementpane, there should also be an option to hide the property pane |
@tilmx if it's used as an actual tab I agree, but if it's used as an checkbox I'd disagree. |
I removed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments
import styled from 'styled-components'; | ||
|
||
export interface TabSwitchProps { | ||
active?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use an required enum instead:
enum TabSwitchState {
Active,
Default
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did that!
src/electron/main.ts
Outdated
@@ -508,7 +507,7 @@ async function createWindow(): Promise<void> { | |||
minWidth: 780, | |||
minHeight: 380, | |||
titleBarStyle: 'hiddenInset', | |||
backgroundColor: Color.Grey97, | |||
backgroundColor: '#f7f7f7', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some special reason for this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color.Grey97 didn’t work (I guess because electron only allows hex values)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so lets use the color
module here to convert from rgb to hex then.
Add a tab switch to hide both the pages or the elements & library: