Skip to content

Commit

Permalink
resize dialog_startup based on widget sizing, should fix incorrect si…
Browse files Browse the repository at this point in the history
…ze on Linux; dialog_path shoud require scrollbox
  • Loading branch information
danomatika committed Aug 21, 2017
1 parent 994e290 commit 859340a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tcl/dialog_path.tcl
@@ -1,6 +1,8 @@

package provide dialog_path 0.1

package require scrollboxwindow

namespace eval ::dialog_path:: {
variable use_standard_paths_button 1
variable verbose_button 0
Expand Down Expand Up @@ -42,7 +44,7 @@ proc ::dialog_path::pdtk_path_dialog {mytoplevel extrapath verbose} {
proc ::dialog_path::create_dialog {mytoplevel} {
global docspath
global installpath
scrollboxwindow::make $mytoplevel $::sys_searchpath \
::scrollboxwindow::make $mytoplevel $::sys_searchpath \
dialog_path::add dialog_path::edit dialog_path::commit \
[_ "Pd search path for objects, help, fonts, and other files"] \
450 300 1
Expand Down
11 changes: 8 additions & 3 deletions tcl/dialog_startup.tcl
Expand Up @@ -84,7 +84,8 @@ proc ::dialog_startup::create_dialog {mytoplevel} {
::scrollboxwindow::make $mytoplevel $::startup_libraries \
dialog_startup::add dialog_startup::edit dialog_startup::commit \
[_ "Pd libraries to load on startup"] \
450 320 0
450 300 0
wm geometry $mytoplevel ""
::pd_bindings::dialog_bindings $mytoplevel "startup"

frame $mytoplevel.flags
Expand All @@ -94,9 +95,9 @@ proc ::dialog_startup::create_dialog {mytoplevel} {
pack $mytoplevel.flags.entry -side right -expand 1 -fill x
pack $mytoplevel.flags.entryname -side right

frame $mytoplevel.defeatrtframe
pack $mytoplevel.defeatrtframe -side top -anchor s -fill x -padx 2m -pady 5
if {$::windowingsystem ne "win32"} {
frame $mytoplevel.defeatrtframe
pack $mytoplevel.defeatrtframe -side top -anchor s -fill x -padx 2m -pady 5
checkbutton $mytoplevel.defeatrtframe.defeatrt -anchor w \
-text [_ "Defeat real-time scheduling"] \
-variable ::dialog_startup::defeatrt_button
Expand Down Expand Up @@ -128,6 +129,10 @@ proc ::dialog_startup::create_dialog {mytoplevel} {
$mytoplevel.nb.buttonframe.ok config -highlightthickness 0
$mytoplevel.nb.buttonframe.cancel config -highlightthickness 0
}

# set min size based on widget sizing
update
wm minsize $mytoplevel [winfo width $mytoplevel] [winfo height $mytoplevel]
}

# for focus handling on OSX
Expand Down

0 comments on commit 859340a

Please sign in to comment.