ElectronicWar / nbs-irc

Fork of latest nbs-irc code to add support for various modern mIRC features
MIT License
21 stars 3 forks source link

Layout issue with mIRC 7.47 #13

Closed delixyr closed 7 years ago

delixyr commented 7 years ago

The is a small layout issue in the toolbar with mIRC 7.47 mirc_2017-01-26_12-32-14

ElectronicWar commented 7 years ago

Thank you for the report, I will check this out later today

ghost commented 7 years ago

I changed a few things to help fix this.

Modified alias n.toolbar (line 96 - main.nbs)

Added 4 lines:

  toolbar -d htile
  toolbar -d vtile
  toolbar -d cascade
  toolbar -d arrange

So it becomes this:

alias n.toolbar {
  toolbar -r
  toolbar -d sep1
  toolbar -d sep2
  toolbar -d sep3
  toolbar -d sep4
  toolbar -d sep5
  toolbar -d sep6
  toolbar -d sep7
  toolbar -d sep8
  toolbar -d sep9
  toolbar -d chanlist
  toolbar -d addrbook
  toolbar -d timer
  toolbar -d send
  toolbar -d chat
  toolbar -d dccopts
  toolbar -d rcvdfiles
  toolbar -d logfiles
  toolbar -d notify
  toolbar -d notify2
  toolbar -d urls
  toolbar -d urls2
  toolbar -d htile
  toolbar -d vtile
  toolbar -d cascade
  toolbar -d arrange
  toolbar -d about
  toolbar -m 8 6
  toolbar -m 6 7
  toolbar -iz1n7 3 ac "Auto connect settings" scripts\dll\tb.dll /autocon @tb.ac
  toolbar -is 5 s1
  toolbar -is 10 s2
  toolbar -iz1n0 11 nbs-setup "nbs options" scripts\dll\tb.dll /setup @tb.setup
  toolbar -iz1n2 12 nbs-theme "Theme/font setup" scripts\dll\tb.dll /theme @tb.theme
  toolbar -iz1n3 13 nbs-alarm "Alarm timer" scripts\dll\tb.dll /alarm @tb.alarm
  toolbar -iz1n1 14 nbs-lv "Logviewer" scripts\dll\tb.dll /logg @tb.lv
  if ($ncfg(toolbar_disable_winamp) != 1) {
    toolbar -is 15 s3
    toolbar -iz1n4 16 nbs-waprev "Previous track (Winamp)" scripts\dll\tb.dll "/dll scripts\dll\winamp.dll prevsong"
    toolbar -iz1n5 17 nbs-waplaypause "Play/pause (Winamp)" scripts\dll\tb.dll "/dll scripts\dll\winamp.dll playpause"
    toolbar -iz1n6 18 nbs-wanext "Next track (Winamp)" scripts\dll\tb.dll "/dll scripts\dll\winamp.dll nextsong"
  }
  if ($dialog(tb)) dialog -x tb
  dlg tb
  showmirc -s
}

Changed dialog tb and the dialog:tb:init event (line 2660 - main.nbs)

Before:

dialog tb {
  title "tåålbar"
  size 1 1 700 0
  option pixels
  button "", 1, 235 0 500 14
  button "", 2, 235 13 500 14
  combo 3, 0 2 183 290, size edit drop
  icon 4, 187 4 16 16, $scriptdirdll\i.dll, 13, noborder
  icon 5, 207 4 16 16, $scriptdirdll\i.dll, 14, noborder
  button "", 6, 226 18 5 5, hide ok
}
on *:dialog:tb:init:0:{
  n.mdx SetMircVersion $version
  n.mdx MarkDialog $dname
  n.mdx SetDialog $dname style
  dll $cit(scripts\dll\mdock61.dll) DockToolbar $dialog(tb).hwnd
  dialog -s tb $iif($ncfg(toolbar_disable_winamp) == 1,361,439) 0 700 0
  n.mdx SetControlMDX tb 1 Text noPrefix > scripts\dll\mdx\ctl_gen.mdx
  n.mdx SetControlMDX tb 2 Text noPrefix > scripts\dll\mdx\ctl_gen.mdx
  n.mdx SetFont tb 1 11 400 tahoma
  n.mdx SetFont tb 2 11 400 tahoma
  titleupdate
  loadbuf -o tb 3 config\kor.txt
}

After:

dialog tb {
  title "tåålbar"
  size 1 1 500 0
  option dbu
  button "", 1, 96 2 200 5
  button "", 2, 96 7 200 5
  combo 3, 0 2 80 80, size edit drop
  icon 4, 82 4 8 8, $scriptdirdll\i.dll, 13, noborder
  icon 5, 88 4 8 8, $scriptdirdll\i.dll, 14, noborder
  button "", 6, 226 18 5 5, hide ok
}
on *:dialog:tb:init:0:{
  n.mdx SetMircVersion $version
  n.mdx MarkDialog $dname
  n.mdx SetDialog $dname style
  dll $cit(scripts\dll\mdock61.dll) DockToolbar $dialog(tb).hwnd
  dialog -s tb $iif($ncfg(toolbar_disable_winamp) == 1,400,478) 0 500 0
  n.mdx SetControlMDX tb 1 Text noPrefix > scripts\dll\mdx\ctl_gen.mdx
  n.mdx SetControlMDX tb 2 Text noPrefix > scripts\dll\mdx\ctl_gen.mdx
  n.mdx SetFont tb 1 11 400 tahoma
  n.mdx SetFont tb 2 11 400 tahoma
  titleupdate
  loadbuf -o tb 3 config\kor.txt
}

P.S.:

ElectronicWar commented 7 years ago

I can't reproduce on Windows 10. Your toolbar looks funky in general with weird spacing. Are you using DPI scaling? What Windows are you on?

image

The items after the search box are slightly too high but overall it looks OK.

ghost commented 7 years ago

Ah good call. For me, I had DPI scaling on. I restored the old main.nbs and I turned DPI scaling off and restarted my computer. Now it looks like this again: image

Could well be the case with OP. Don't mind me, just wanted to help out :) - Windows 10 btw.

ElectronicWar commented 7 years ago

You can deactivate DPI scaling per-application in Windows, no need to turn it off globally.

ElectronicWar commented 7 years ago

Activate that checkbox:

image

delixyr commented 7 years ago

I turned off the DPI scaling for nbs and mirc. The issue persists. I am on Windows 10 too.

Update : I completey uninstalled and nbs. Removed all files using Revo uninstaller. Reisntalled with original nbs setup. The issue still existed. Updated nbs and now it looks fine.

mirc_2017-01-26_12-32-14

ElectronicWar commented 7 years ago

Thank you very much for the feedback @delixyr I will close this for the time being, not sure If I can implement any DPI awareness in the future, but it seems that simply something was corrupt for you.