twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

List - incorrect behavior when the control style is enabled "transparent" #62

Open EpicNet opened 2 years ago

EpicNet commented 2 years ago

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

When set the control style transparent when every new row is selected, then the highlighted selection for the previous row is not canceled. In addition, if you go down the list beyond the border of the control, then instead of a transparent background, it turns black. Everything will be restored only after you first minimize the main window and then expand it again. Also, everything is restored after executing the command: "/xdialog -j list_test". It probably has something to do with adding a background color to the "List" control, since if do not do this, then there will be no transparency effect.

Would like to see a fix for this problem. Thanks.


image image

Here is a test piece of script to reproduce this the problem. To run the script click on "F5" or enter the command "/list_test":

alias F5 { list_test }
alias list_test {
  if ($dialog(list_test)) .dialog -x list_test
  else { .dialog -m list_test list_test }
}
dialog list_test {
  title "List test"
  icon $mircexe,0
  option pixels
  size -1 -1 300 255
}
on *:DIALOG:list_test:init:*:{
  .dcx Mark $dname list_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -g $dname +is $mircdir\image\background.jpg
  list_making $dname 1
}
alias -l list_making {
  .xdialog -c $1 $2 list 30 30 240 200 notheme transparent
  .xdid -x $1 $2 +b
  .xdid -C $1 $2 +b $rgb(40,40,47)
  .xdid -C $1 $2 +t $rgb(235,227,203)
  .xdid -f $1 $2 +ab ansi 10 Comic Sans MS
  var %i 1 | while (%i <= 50) {
    .xdid -a $1 $2 %i $+(04,%i,.,) Line of text to test
    inc %i
  }
}
alias list_test_work {}
OokEek commented 2 years ago

fixed the item updating issue, but the drawing is still not right when scrolling etc.. As a quick fix try xdialog -b $dname +tyx to enable composited style, this has other issues with other controls so may not be for you.

EpicNet commented 2 years ago

As a quick fix try "/xdialog -b $dname +tyx" to enable composited style.

This helped to get rid of the highlighting of the previous lines when going to the next line, but when I go beyond the border of the visible part of the control, then the previous line contains part of the line selection outside the text:

image

EpicNet commented 2 years ago

Test on "DCX dll v3.1-git469".

Have appeared are noticeable improvements and fixed the previous problem, but now if use the "up/down" keys when quickly move between lines from beginning to end, then a noticeable flicker of all lines appears.