dcxdll icon indicating copy to clipboard operation
dcxdll copied to clipboard

Box - add support for customizing border color, thickness and roundness size

Open EpicNet opened this issue 4 years ago • 1 comments

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

For some reason we don't have the option to set the border color (with straight corners by default) of the control "Box". This can only be done when using the style rounded for border with rounded corners.

My suggestions on what needs to be added to the control "Box" to make it as maximally functional and beautiful customizable:

  1. Add the ability to customize the border color of the control with straight corners using the same command that is used for rounded corners xdid -С dialog 1 +r $rgb(255,0,0) to set and display the same color regardless of style.
  2. Add a new command xdid -W dialog 1 2 to adjust the border thickness of the control. Default value is 1.
  3. Add a new command xdid -r dialog 1 3 to set the size of the rounding of the corners of the control's border when using the style rounded. Default value is 5.
  4. Add a new style outline to display a dark/black outline around the text, thick 1-2px, for better readability of colored text, depending on the background color.

Screenshot of how it is displayed now:

Image


Script code for testing, to run enter the command /box_test or F5:

alias F5 { box_test }
alias box_test { $iif($dialog(box_test),dialog -x box_test,dialog -m box_test box_test) }
dialog -l box_test {
  title "Box test"
  icon $mircexe,0
  option pixels
  size -1 -1 400 300
}
on *:DIALOG:box_test:init:*:{
  dcx Mark $dname box_test_work
  xdialog -b $dname +ty | xdialog -g $dname +b $rgb(20,20,27)
  box_making $dname 1
}
alias -l box_making {
  xdialog -c $1 $2 box 50 45 300 205 notheme noformat center
  xdid -C $1 $2 +bk $rgb(40,40,47)
  xdid -C $1 $2 +t $rgb(255,136,0)
  xdid -t $1 $2 Box
  var %x 25 | var %y 25 | var %n $calc($2 +1) | var %i 1
  while (%i <= 6) {
    xdid -c $1 $2 %n box %x %y 70 70 notheme noformat center
    xdid -C $1 %n +bk $rgb(20,20,27)
    xdid -C $1 %n +t $rgb(95,148,34)
    xdid -t $1 %n Box %i
    inc %i | inc %n
    if (%i < 4) || (%i > 4) { inc %x 90 } | else { var %x 25 | var %y 110 }
  }
}
alias box_test_work {}

EpicNet avatar Sep 17 '21 08:09 EpicNet