Skip to content

Commit

Permalink
Merge remote-tracking branch 'fork/colors' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sebshader committed Dec 22, 2021
2 parents 7cbbb44 + d975b43 commit 85558ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions doc/7.stuff/colors-plugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# text_window_fill - [text] window background
# text_window_text - [text] window text
# text_window_highlight - like txt_highlight but for [text] window
# text_window_hl_text - color of highlighted text in [text] window
# text_window_cursor - [text] window cursor
# pdwindow_fill - background of post window
# pdwindow_fatal_text - text for fatal errors
Expand Down Expand Up @@ -72,6 +73,7 @@ atom_box_label "black"
atom_box_outline "cyan"
text_window_fill "black"
text_window_text "white"
text_window_hl_text "white"
text_window_highlight "green"
text_window_cursor "green"
pdwindow_fill "#000"
Expand Down
4 changes: 2 additions & 2 deletions src/g_rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@ static void rtext_senditup(t_rtext *x, int action, int *widthp, int *heightp,
}
sys_vgui("pdtk_text_new .x%lx.c {%s %s text} %d %d {%s } "
"%d [::pdtk_canvas::get_color %s .x%lx]\n",
(long)canvas, x->x_tag, rtext_gettype(x)->s_name,
canvas, x->x_tag, rtext_gettype(x)->s_name,
text_xpix(x->x_text, x->x_glist) + lmargin,
text_ypix(x->x_text, x->x_glist) + tmargin,
escbuf, guifontsize, txtcolor, (long)canvas);
escbuf, guifontsize, txtcolor, canvas);
}
else if (action == SEND_UPDATE)
{
Expand Down
1 change: 1 addition & 0 deletions tcl/pd-gui.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ gop_box "#FF8080"
text_window_fill "#FFFFFF"
text_window_text "#000"
text_window_highlight ""
text_window_hl_text ""
text_window_cursor "#000"
pdwindow_fill "#FFFFFF"
pdwindow_fatal_text "#D00"
Expand Down
10 changes: 5 additions & 5 deletions tcl/pdtk_textwindow.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ proc pdtk_textwindow_open {name geometry title font} {
text $name.text -relief raised -highlightthickness 0 -bd 2 \
-font [get_font_for_size $font] \
-exportselection 1 -undo 1 \
-yscrollcommand "$name.scroll set" -background \
[::pdtk_canvas::get_color text_window_fill $name] \
-foreground [::pdtk_canvas::get_color text_window_text $name] \
-insertbackground \
[::pdtk_canvas::get_color text_window_cursor $name]
-yscrollcommand "$name.scroll set"

set tmpcol [::pdtk_canvas::get_color text_window_text $name]
if {$tmpcol ne ""} {
Expand All @@ -47,6 +43,10 @@ proc pdtk_textwindow_open {name geometry title font} {
if {$tmpcol ne ""} {
$name.text configure -selectbackground $tmpcol
}
set tmpcol [::pdtk_canvas::get_color text_window_hl_text $name]
if {$tmpcol ne ""} {
$name.text configure -selectforeground $tmpcol
}
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
pack $name.text -side left -fill both -expand 1
Expand Down

0 comments on commit 85558ee

Please sign in to comment.