@@ -70,6 +70,8 @@ import { getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
70
70
import { WorkbenchStateContext } from 'vs/workbench/browser/contextkeys' ;
71
71
import { IsIOSContext } from 'vs/platform/contextkey/common/contextkeys' ;
72
72
import { AddRootFolderAction } from 'vs/workbench/browser/actions/workspaceActions' ;
73
+ import { Checkbox } from 'vs/base/browser/ui/checkbox/checkbox' ;
74
+ import { Codicon } from 'vs/base/common/codicons' ;
73
75
74
76
const SLIDE_TRANSITION_TIME_MS = 250 ;
75
77
const configurationKey = 'workbench.startupEditor' ;
@@ -150,6 +152,7 @@ export class GettingStartedPage extends EditorPane {
150
152
private layoutMarkdown : ( ( ) => void ) | undefined ;
151
153
152
154
private webviewID = generateUuid ( ) ;
155
+ private categoriesSlideDisposables : DisposableStore ;
153
156
154
157
constructor (
155
158
@ICommandService private readonly commandService : ICommandService ,
@@ -187,6 +190,8 @@ export class GettingStartedPage extends EditorPane {
187
190
this . stepMediaComponent = $ ( '.getting-started-media' ) ;
188
191
this . stepMediaComponent . id = generateUuid ( ) ;
189
192
193
+ this . categoriesSlideDisposables = this . _register ( new DisposableStore ( ) ) ;
194
+
190
195
this . contextService = this . _register ( contextService . createScoped ( this . container ) ) ;
191
196
inWelcomeContext . bindTo ( this . contextService ) . set ( true ) ;
192
197
embedderIdentifierContext . bindTo ( this . contextService ) . set ( productService . embedderIdentifier ) ;
@@ -861,10 +866,17 @@ export class GettingStartedPage extends EditorPane {
861
866
}
862
867
863
868
private async buildCategoriesSlide ( ) {
864
- const showOnStartupCheckbox = $ ( 'input.checkbox' , { id : 'showOnStartup' , type : 'checkbox' } ) as HTMLInputElement ;
869
+ this . categoriesSlideDisposables . clear ( ) ;
870
+ const showOnStartupCheckbox = new Checkbox ( {
871
+ icon : Codicon . check ,
872
+ actionClassName : 'getting-started-checkbox' ,
873
+ isChecked : this . configurationService . getValue ( configurationKey ) === 'welcomePage' ,
874
+ title : localize ( 'checkboxTitle' , "When checked, this page will be shown on startup." ) ,
875
+ } ) ;
876
+ showOnStartupCheckbox . domNode . id = 'showOnStartup' ;
865
877
866
- showOnStartupCheckbox . checked = this . configurationService . getValue ( configurationKey ) === 'welcomePage' ;
867
- this . _register ( addDisposableListener ( showOnStartupCheckbox , 'click' , ( ) => {
878
+ this . categoriesSlideDisposables . add ( showOnStartupCheckbox ) ;
879
+ this . categoriesSlideDisposables . add ( showOnStartupCheckbox . onChange ( ( ) => {
868
880
if ( showOnStartupCheckbox . checked ) {
869
881
this . telemetryService . publicLog2 < GettingStartedActionEvent , GettingStartedActionClassification > ( 'gettingStarted.ActionExecuted' , { command : 'showOnStartupChecked' , argument : undefined } ) ;
870
882
this . configurationService . updateValue ( configurationKey , 'welcomePage' ) ;
@@ -889,7 +901,7 @@ export class GettingStartedPage extends EditorPane {
889
901
890
902
const footer = $ ( '.footer' , { } ,
891
903
$ ( 'p.showOnStartup' , { } ,
892
- showOnStartupCheckbox ,
904
+ showOnStartupCheckbox . domNode ,
893
905
$ ( 'label.caption' , { for : 'showOnStartup' } , localize ( 'welcomePage.showOnStartup' , "Show welcome page on startup" ) )
894
906
) ) ;
895
907
@@ -1638,16 +1650,16 @@ registerThemingParticipant((theme, collector) => {
1638
1650
1639
1651
const checkboxBackground = theme . getColor ( simpleCheckboxBackground ) ;
1640
1652
if ( checkboxBackground ) {
1641
- collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .showOnStartup . checkbox { background-color: ${ checkboxBackground } ; }` ) ;
1653
+ collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .gettingStartedSlide .getting-started- checkbox { background-color: ${ checkboxBackground } !important ; }` ) ;
1642
1654
}
1643
1655
1644
1656
const checkboxForeground = theme . getColor ( simpleCheckboxForeground ) ;
1645
1657
if ( checkboxForeground ) {
1646
- collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .showOnStartup . checkbox { color: ${ checkboxForeground } ; }` ) ;
1658
+ collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .gettingStartedSlide .getting-started- checkbox { color: ${ checkboxForeground } !important ; }` ) ;
1647
1659
}
1648
1660
1649
1661
const checkboxBorder = theme . getColor ( simpleCheckboxBorder ) ;
1650
1662
if ( checkboxBorder ) {
1651
- collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .showOnStartup . checkbox { border-color: ${ checkboxBorder } ; }` ) ;
1663
+ collector . addRule ( `.monaco-workbench .part.editor>.content .gettingStartedContainer .gettingStartedSlide .getting-started- checkbox { border-color: ${ checkboxBorder } !important ; }` ) ;
1652
1664
}
1653
1665
} ) ;
0 commit comments