dcxdll icon indicating copy to clipboard operation
dcxdll copied to clipboard

Line - incorrect line coloring when the control style is enabled "simple"

Open EpicNet opened this issue 4 years ago • 4 comments

I am using "mIRC v7.67" + "DCX dll v3.1-git469" in system "Windows 8.1 x64".

When using the style simple, a colored line is drawn, and a duplicate in the form of a light gray line is drawn next to it. At the same time, as can see in the screenshot, the first cross of the two lines has no color at all.

It seems that something is not working correctly here. Would like to see a fix for this problem. Thanks.

Image

Script to reproduce the problem. To run, press F5 or enter the command /line_test:

alias F5 { line_test }
alias -l line_test {
  if ($dialog(line_test)) .dialog -x line_test | else { .dialog -m line_test line_test }
}
dialog -l line_test {
  title "Line test"
  icon $mircexe,0
  option pixels
  size -1 -1 370 120
}
on *:DIALOG:line_test:init:0:{
  .dcx Mark $dname line_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 line 20 44 50 1 simple | .xdid -C $dname 1 +b $rgb(255,0,0)
  .xdialog -c $dname 2 line 43 20 1 50 simple vertical | .xdid -C $dname 2 +b $rgb(255,0,0)
  .xdialog -c $dname 3 line 90 44 50 2 simple | .xdid -C $dname 3 +b $rgb(255,0,0)
  .xdialog -c $dname 4 line 113 20 2 50 simple vertical | .xdid -C $dname 4 +b $rgb(255,0,0)
  .xdialog -c $dname 5 line 160 44 50 3 simple | .xdid -C $dname 5 +b $rgb(255,0,0)
  .xdialog -c $dname 6 line 183 20 3 50 simple vertical | .xdid -C $dname 6 +b $rgb(255,0,0)
  .xdialog -c $dname 7 line 230 44 50 4 simple | .xdid -C $dname 7 +b $rgb(255,0,0)
  .xdialog -c $dname 8 line 252 20 4 50 simple vertical | .xdid -C $dname 8 +b $rgb(255,0,0)
  .xdialog -c $dname 9 line 300 44 50 5 simple | .xdid -C $dname 9 +b $rgb(255,0,0)
  .xdialog -c $dname 10 line 322 20 5 50 simple vertical | .xdid -C $dname 10 +b $rgb(255,0,0)
  .xdialog -c $dname 11 line 20 90 330 10 simple | .xdid -C $dname 11 +b $rgb(255,0,0)
}
alias line_test_work {}

EpicNet avatar Nov 06 '21 23:11 EpicNet

I found a temporary workaround to fix this problem. If add text through the command "/xdid -t $dname 1 $str($chr(8195),50)", where instead of letters for writing will be used (wide space), which will be cloned for a certain number of characters, this will help to draw a colored line in the desired size. But at the same time, another problem arises, which consists is that, if such drawn lines are long enough and there will be a lot of them, then would need to use a lot more characters to color the line, and in which case, when stretching (resizing) the dialog box, there will be a noticeable large deceleration (braking) for the window to refresh.

So, this method is not suitable for regular use in resizable dialog boxes, and may not be a stable solution to this problem. Therefore, it is obvious that something needs to be changed in the code so that you can draw simple colored lines without using text, as it was originally intended. Perhaps this will give some hints on how can to fix this problem. Thanks in advance.


image

Here's a modified script to help demonstrate how to draw different colored lines:

alias F5 { line_test }
alias -l line_test {
  if ($dialog(line_test)) .dialog -x line_test | else { .dialog -m line_test line_test }
}
dialog -l line_test {
  title "Line test"
  icon $mircexe,0
  option pixels
  size -1 -1 380 165
}
on *:DIALOG:line_test:init:0:{
  .dcx Mark $dname line_test_work
  .xdialog -b $dname +tyxz
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 line 20 44 50 1 simple | .xdid -C $dname 1 +b $rgb(255,0,0) | .xdid -t $dname 1 $str($chr(8195),50)
  .xdialog -c $dname 2 line 43 20 1 50 simple vertical | .xdid -C $dname 2 +b $rgb(255,0,0) | .xdid -t $dname 2 $str($chr(8195),50)
  .xdialog -c $dname 3 line 90 44 50 2 simple | .xdid -C $dname 3 +b $rgb(255,0,0) | .xdid -t $dname 3 $str($chr(8195),50)
  .xdialog -c $dname 4 line 113 20 2 50 simple vertical | .xdid -C $dname 4 +b $rgb(255,0,0) | .xdid -t $dname 4 $str($chr(8195),50)
  .xdialog -c $dname 5 line 160 44 50 3 simple | .xdid -C $dname 5 +b $rgb(255,0,0) | .xdid -t $dname 5 $str($chr(8195),50)
  .xdialog -c $dname 6 line 183 20 3 50 simple vertical | .xdid -C $dname 6 +b $rgb(255,0,0) | .xdid -t $dname 6 $str($chr(8195),50)
  .xdialog -c $dname 7 line 230 43 50 4 simple | .xdid -C $dname 7 +b $rgb(255,0,0) | .xdid -t $dname 7 $str($chr(8195),50)
  .xdialog -c $dname 8 line 252 20 4 50 simple vertical | .xdid -C $dname 8 +b $rgb(255,0,0) | .xdid -t $dname 8 $str($chr(8195),50)
  .xdialog -c $dname 9 line 300 43 50 5 simple | .xdid -C $dname 9 +b $rgb(255,0,0) | .xdid -t $dname 9 $str($chr(8195),50)
  .xdialog -c $dname 10 line 322 20 5 50 simple vertical | .xdid -C $dname 10 +b $rgb(255,0,0) | .xdid -t $dname 10 $str($chr(8195),50)
  .xdialog -c $dname 11 line 20 90 330 10 simple | .xdid -C $dname 11 +b $rgb(0,130,200) | .xdid -t $dname 11 $str($chr(8195),50)
  .xdialog -c $dname 12 line 20 110 330 6 simple | .xdid -C $dname 12 +b $rgb(255,200,0) | .xdid -t $dname 12 $str($chr(8195),50)
  .xdialog -c $dname 13 line 20 125 330 3 simple | .xdid -C $dname 13 +b $rgb(23,200,0) | .xdid -t $dname 13 $str($chr(8195),50)
  .xdialog -c $dname 14 line 20 136 330 1 simple | .xdid -C $dname 14 +b $rgb(255,0,0) | .xdid -t $dname 14 $str($chr(8195),50)
}
alias line_test_work {}

EpicNet avatar Nov 07 '21 07:11 EpicNet