@@ -347,8 +347,12 @@ def create_new_project_location(self) -> None:
347
347
self .project_location_label = ttk .Label (master = self .project_location_frame , text = "Project location: " )
348
348
self .project_location_label .grid (row = 0 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
349
349
self .project_location_var = tk .StringVar ()
350
- self .project_location_entry = EntryWithRightClick (master = self .project_location_frame ,
351
- textvariable = self .project_location_var , width = 51 )
350
+ if os_detect .on_linux ():
351
+ self .project_location_entry = EntryWithRightClick (master = self .project_location_frame ,
352
+ textvariable = self .project_location_var , width = 32 )
353
+ else :
354
+ self .project_location_entry = EntryWithRightClick (master = self .project_location_frame ,
355
+ textvariable = self .project_location_var , width = 51 )
352
356
self .project_location_entry .initiate_right_click_menu ()
353
357
self .project_location_entry .grid (row = 0 , column = 1 , padx = 1 , pady = 1 , sticky = tk .NW )
354
358
self .add_tooltip (self .project_location_entry , "Where to put the new project." )
@@ -368,7 +372,10 @@ def create_new_project_details(self) -> None:
368
372
self .project_title_label = ttk .Label (master = self .project_details_frame , text = "Project title: " )
369
373
self .project_title_label .grid (row = 0 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
370
374
self .project_title_var = tk .StringVar (value = "Untitled" )
371
- self .project_title_entry = EntryWithRightClick (master = self .project_details_frame , width = 40 , textvariable = self .project_title_var )
375
+ if os_detect .on_linux ():
376
+ self .project_title_entry = EntryWithRightClick (master = self .project_details_frame , width = 24 , textvariable = self .project_title_var )
377
+ else :
378
+ self .project_title_entry = EntryWithRightClick (master = self .project_details_frame , width = 40 , textvariable = self .project_title_var )
372
379
self .project_title_entry .initiate_right_click_menu ()
373
380
self .project_title_entry .grid (row = 0 , column = 1 , padx = 1 , pady = 1 , sticky = tk .NW )
374
381
self .add_tooltip (self .project_title_entry , "The title of the project." )
@@ -762,7 +769,10 @@ def make_title(self, title: str) -> None:
762
769
self .title_label = ttk .Label (master = self .title_frame , text = "Project title: " )
763
770
self .title_label .grid (row = 0 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
764
771
self .title_var = tk .StringVar (value = title )
765
- self .title_entry = EntryWithRightClick (master = self .title_frame , width = 29 , textvariable = self .title_var )
772
+ if os_detect .on_linux ():
773
+ self .title_entry = EntryWithRightClick (master = self .title_frame , width = 24 , textvariable = self .title_var )
774
+ else :
775
+ self .title_entry = EntryWithRightClick (master = self .title_frame , width = 29 , textvariable = self .title_var )
766
776
self .title_entry .initiate_right_click_menu ()
767
777
self .title_entry .grid (row = 0 , column = 1 , padx = 1 , pady = 1 , sticky = tk .NW )
768
778
self .add_tooltip (self .title_entry , "The title of the opened project." )
@@ -778,7 +788,10 @@ def make_description(self, description: str) -> None:
778
788
self .description_frame .grid (row = 1 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
779
789
self .description_label = ttk .Label (master = self .description_frame , text = "Project description: " )
780
790
self .description_label .grid (row = 0 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
781
- self .description_text = TextWithRightClick (master = self .description_frame , width = 31 , height = 8 , wrap = tk .WORD )
791
+ if os_detect .on_linux ():
792
+ self .description_text = TextWithRightClick (master = self .description_frame , width = 35 , height = 11 , wrap = tk .WORD )
793
+ else :
794
+ self .description_text = TextWithRightClick (master = self .description_frame , width = 31 , height = 8 , wrap = tk .WORD )
782
795
self .description_text .initiate_right_click_menu ()
783
796
self .description_text .grid (row = 1 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
784
797
self .description_text .insert ("1.0" , description )
@@ -816,7 +829,10 @@ def make_drive_selector(self, drive: Path) -> None:
816
829
self .drive_selector_var = tk .StringVar ()
817
830
if drive is not None :
818
831
self .drive_selector_var .set (str (drive ))
819
- self .drive_selector_combobox = ComboboxWithRightClick (master = self .drive_selector_frame , width = 48 , textvariable = self .drive_selector_var )
832
+ if os_detect .on_linux ():
833
+ self .drive_selector_combobox = ComboboxWithRightClick (master = self .drive_selector_frame , width = 44 , textvariable = self .drive_selector_var )
834
+ else :
835
+ self .drive_selector_combobox = ComboboxWithRightClick (master = self .drive_selector_frame , width = 48 , textvariable = self .drive_selector_var )
820
836
self .drive_selector_combobox .initiate_right_click_menu ()
821
837
self .drive_selector_combobox .grid (row = 0 , column = 1 , padx = 1 , pady = 1 , sticky = tk .NW )
822
838
self .add_tooltip (self .drive_selector_combobox , "The CircuitPython device to sync to." )
@@ -853,7 +869,10 @@ def make_file_sync_listbox(self, to_sync: list[str], project_root: Path) -> None
853
869
self .to_sync_label = ttk .Label (master = self .to_sync_frame , text = "Files and directories to sync: " )
854
870
self .to_sync_label .grid (row = 0 , column = 0 , columnspan = 3 , padx = 1 , pady = 1 , sticky = tk .NW )
855
871
self .to_sync_var = tk .StringVar (value = to_sync )
856
- self .to_sync_listbox = ListboxWithRightClick (master = self .to_sync_frame , height = 10 , width = 20 , listvariable = self .to_sync_var )
872
+ if os_detect .on_linux ():
873
+ self .to_sync_listbox = ListboxWithRightClick (master = self .to_sync_frame , height = 12 , width = 20 , listvariable = self .to_sync_var )
874
+ else :
875
+ self .to_sync_listbox = ListboxWithRightClick (master = self .to_sync_frame , height = 10 , width = 20 , listvariable = self .to_sync_var )
857
876
self .to_sync_listbox .initiate_right_click_menu (disable = ["Copy" , "Cut" , "Paste" , "Delete" , "Select all" ],
858
877
callback = self .update_listbox_context )
859
878
self .to_sync_listbox .right_click_menu .entryconfigure ("Delete" , command = self .remove_thing_to_sync )
@@ -973,7 +992,7 @@ def make_file_sync_buttons(self) -> None:
973
992
command = self .add_file_to_sync )
974
993
self .to_sync_add_file_btn .grid (row = 0 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
975
994
self .add_tooltip (self .to_sync_add_file_btn , "Add a new file via the file selector." )
976
- self .to_sync_add_directory_btn = ttk .Button (master = self .right_frame , text = "Add directory" ,
995
+ self .to_sync_add_directory_btn = ttk .Button (master = self .right_frame , text = "Add directory" , width = 12 ,
977
996
command = self .add_directory_to_sync )
978
997
self .to_sync_add_directory_btn .grid (row = 1 , column = 0 , padx = 1 , pady = 1 , sticky = tk .NW )
979
998
self .add_tooltip (self .to_sync_add_directory_btn , "Add a new directory via the directory selector." )
0 commit comments