Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
9b416f25
Commit
9b416f25
authored
Mar 18, 2014
by
Ivica Bukvic
Browse files
cosmetic improvements to the preferences dialog
parent
236797e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/src/dialog_gui.tcl
View file @
9b416f25
...
...
@@ -93,7 +93,7 @@ proc ::dialog_gui::set_gui_preset {args} {
set ::pd_colors
(
magic_glass_text
)
"#000000"
set ::pd_colors
(
magic_glass_flash
)
"#e87216"
}
L2
o
rk
{
L2
O
rk
{
set ::pd_colors
(
atom_box
)
"#eee"
set ::pd_colors
(
atom_box_border
)
"#ccc"
set ::pd_colors
(
canvas_color
)
white
...
...
@@ -124,7 +124,7 @@ proc ::dialog_gui::set_gui_preset {args} {
set ::pd_colors
(
magic_glass_text
)
white
set ::pd_colors
(
magic_glass_flash
)
"#e87216"
}
L2
o
rk_Inverted
{
L2
O
rk_Inverted
{
set ::pd_colors
(
atom_box
)
black
set ::pd_colors
(
atom_box_border
)
white
set ::pd_colors
(
canvas_color
)
black
...
...
@@ -289,9 +289,9 @@ proc ::dialog_gui::create_gui_dialog {mytoplevel} {
set fr
[
ttk::frame $mytoplevel.colors
]
set p
[
ttk::frame $fr.presets
]
ttk::label $p.presetlabel -text
"Color Preset"
# ttk::combobox $fr.presets -state readonly -values
{
Inverted L2
o
rk Foo
}
# ttk::combobox $fr.presets -state readonly -values
{
Inverted L2
O
rk Foo
}
# todo: set presets in _one_ place
::dialog_prefs::dropdown $p.presets ::gui_preset
{
Vanilla Inverted L2
o
rk L2
o
rk_Inverted Extended C64 Strongbad Subdued
}
::dialog_prefs::dropdown $p.presets ::gui_preset
{
Vanilla Inverted L2
O
rk L2
O
rk_Inverted Extended C64 Strongbad Subdued
}
pack $fr -side top
grid $p -column 0 -columnspan 3 -row 0 -sticky w -pady 21
pack $p.presetlabel -side left -padx 7
...
...
pd/src/dialog_midi.tcl
View file @
9b416f25
...
...
@@ -305,10 +305,10 @@ proc ::dialog_midi::pdtk_alsa_midi_dialog {id indev1 indev2 indev3 indev4 \
}
grid rowconfigure $devfr all -pad 3
}
else
{
label $devfr.l1 -text
[
_
"In Ports:"
]
ttk::
label $devfr.l1 -text
[
_
"In Ports:"
]
entry $devfr.x1 -textvariable midi_alsain -width 4
pack $devfr.l1 $devfr.x1 -side left
label $devfr.l2 -text
[
_
"Out Ports:"
]
ttk::
label $devfr.l2 -text
[
_
"Out Ports:"
]
entry $devfr.x2 -textvariable midi_alsaout -width 4
pack $devfr.l2 $devfr.x2 -side left
}
...
...
pd/src/dialog_prefs.tcl
View file @
9b416f25
...
...
@@ -68,6 +68,9 @@ proc ::dialog_prefs::open_prefs_dialog {mytoplevel} {
if
{[
winfo exists .prefs
]}
{
wm deiconify .prefs
raise .prefs
# obtain last known mouse coords and pop the menu there
global pointer_x_global pointer_y_global
wm geometry .prefs
"+
$pointer
_x_global+
$pointer
_y_global"
}
else
{
create_dialog $mytoplevel
}
...
...
@@ -285,7 +288,7 @@ proc ::dialog_prefs::swatchbutton {name variable} {
}
# Tk's color chooser for x11 isn't very good. So instead, the user
# gets a matrix of predefined colors to choose from. If a few custom
# colors could be added
(
or maybe triggering Ivica's L2
o
rk color
# colors could be added
(
or maybe triggering Ivica's L2
O
rk color
# chooser
)
this would be improved.
ttk::menubutton $name -menu $name.m -style PrefsColors.TMenubutton
menu $name.m
...
...
@@ -360,12 +363,21 @@ proc ::dialog_prefs::dialog_bindings {mytoplevel dialogname} {
}
proc ::dialog_prefs::create_dialog
{
mytoplevel
}
{
toplevel .prefs -class
DialogWindow
toplevel .prefs -class
[
winfo class .
]
wm title .prefs
[
_
"Pure Data Preferences"
]
# wm geometry .prefs =475x125+150+150
wm group .prefs .
wm resizable .prefs 0 0
wm transient .prefs
# obtain last known mouse coords and pop the menu there
global pointer_x_global pointer_y_global
if
{
$pointer
_x_global == 0 && $pointer_y_global == 0
}
{
set pointer_x_global
[
expr
[
winfo rootx .
]
+30
]
set pointer_y_global
[
expr
[
winfo rooty .
]
+30
]
}
wm geometry .prefs
"+
$pointer
_x_global+
$pointer
_y_global"
# .prefs configure -menu $::dialog_menubar
# todo: check this on the mac and on windows
...
...
pd/src/pd.tk
View file @
9b416f25
...
...
@@ -570,7 +570,7 @@ trace add variable gui_preset write "::dialog_gui::set_gui_preset"
# Now that we'
ve
got
a
trace
for
the
colors
,
we
can
set
a
#
color
scheme
(
defined
in
dialog_gui
.
tcl
)
set
gui_preset
L2
o
rk
set
gui_preset
L2
O
rk
#
todo
:
find
a
home
for
these
:
set
::
pd_colors
(
signal_cord_width
)
3
...
...
@@ -4798,6 +4798,7 @@ proc pdtk_canvas_motion {name x y mods} {
set
pointer_y_local
$
y
set
pointer_x_global
[
expr
$
pointer_x_local
+
[
winfo
rootx
$
name
]]
set
pointer_y_global
[
expr
$
pointer_y_local
+
[
winfo
rooty
$
name
]]
#
puts
stderr
"motion $pointer_x_global $pointer_y_global"
set
scroll_name
[
string
trimright
$
name
.
c
]
if
{
$::
hit_scrollbar
($
scroll_name
)
!= 0 } { set mods -1 }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment