File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- const bar_continuous = workbench . builder . get_object ( "bar_continuous" ) ;
1+ import Gtk from "gi://Gtk?version=4.0" ;
2+
3+ const bar_continuous = workbench . builder . get_object < Gtk . LevelBar > (
4+ "bar_continuous" ,
5+ ) ;
26
37bar_continuous . add_offset_value ( "full" , 100 ) ;
48bar_continuous . add_offset_value ( "half" , 50 ) ;
59bar_continuous . add_offset_value ( "low" , 25 ) ;
610
7- const bar_discrete = workbench . builder . get_object ( "bar_discrete" ) ;
11+ const bar_discrete = workbench . builder . get_object < Gtk . LevelBar > ( "bar_discrete" ) ;
812
913bar_discrete . add_offset_value ( "very-weak" , 1 ) ;
1014bar_discrete . add_offset_value ( "weak" , 2 ) ;
1115bar_discrete . add_offset_value ( "moderate" , 4 ) ;
1216bar_discrete . add_offset_value ( "strong" , 6 ) ;
1317
14- const entry = workbench . builder . get_object ( "entry" ) ;
15- const label_strength = workbench . builder . get_object ( "label_strength" ) ;
18+ const entry = workbench . builder . get_object < Gtk . Entry > ( "entry" ) ;
19+ const label_strength = workbench . builder . get_object < Gtk . Label > (
20+ "label_strength" ,
21+ ) ;
1622
1723entry . connect ( "notify::text" , ( ) => {
1824 estimatePasswordStrength ( ) ;
You can’t perform that action at this time.
0 commit comments