twig / dcxdll

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

Dialog - when resizing, all created controls periodically blinking (flicker) #42

Open EpicNet opened 2 years ago

EpicNet commented 2 years ago

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

When the general dialog box is dramatically stretched in different directions over long distances, periodic blinking (flickering) of all controls becomes noticeable. This is most noticeable when such controls as "Box" and "Panel" have a control style transparent and rounded, and when have child controls installed inside them, which can also have a transparency and rounding of corners style.

Probably the controls are being redrawn automatically. Is it possible to somehow reduce (smooth out) this visual flaw or completely remove the automatic redrawing of all controls?

After all, if necessary, we already have a command for this: "/xdialog -j [DNAME] (ID)"

For solutions can try to add some new control style, for example noredraw so as not to break backward compatibility.

Then it will look like this: "/xdialog -c $dname 1 box 45 45 300 200 rounded transparent noredraw" - the "Box" control and its child controls should now stop doing any automatic redrawing, when resizing or when opening a dialog. Likewise with "Panel" and others similar controls..

If you can think of some other or additional way to solve this problem, then I would only welcome this help.


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

alias F5 { blinking_test }
alias blinking_test {
  if ($dialog(blinking_test)) .dialog -x blinking_test
  else { .dialog -m blinking_test blinking_test }
}
dialog blinking_test {
  title "Blinking test"
  icon $mircexe,0
  option pixels
  size -1 -1 400 300
}
on *:DIALOG:blinking_test:init:*:{
  .dcx Mark $dname blinking_test_work
  .xdialog -b $dname +tyz
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 box 45 45 300 200 noformat center rounded transparent
  .xdid -C $dname 1 +r $rgb(51,80,19)
  .xdid -C $dname 1 +t $rgb(95,148,34)
  .xdid -t $dname 1 Box
  check_making $dname 1 2 6
  button_making $dname 1 8 4
}
alias check_making {
  var %y 45 | var %n $3 | var %i 1 | while (%i <= $4) {
    .xdid -c $1 $2 %n check 30 %y 130 15 notheme noformat
    .xdid -C $1 %n +bk $rgb(20,20,27)
    .xdid -C $1 %n +t $rgb(70,73,78)
    .xdid -t $1 %n Check text %i
    inc %i | inc %n | inc %y 20
  }
}
alias button_making {
  var %y 40 | var %n $3 | var %i 1 | while (%i <= $4) {
    .xdid -c $1 $2 %n button 170 %y 100 25 notheme noformat noformat bitmap vgradient
    .xdid -J $1 %n +r hand | .xdid -R $1 %n +r 3 | .xdid -m $1 %n 1
    .xdid -C $1 %n +g $rgb(40,40,47)
    .xdid -C $1 %n +G $rgb(25,25,25)
    .xdid -c $1 %n +dn $rgb(140,140,147)
    .xdid -c $1 %n +h $rgb(180,180,187)
    .xdid -c $1 %n +s $rgb(255,248,225)
    .xdid -t $1 %n Button %i
    inc %i | inc %n | inc %y 35
  }
}
alias blinking_test_work {}