D 2019-05-17T11:38:04.008 J icomment More\son\sthis\sissue:\r\n

\r\nMy\sgoal\sis\sto\spresent\san\ssdltk\swindow\son\sa\sdesktop\sPC\sthat\saccurately\semulates\sthe\sscreen\sof\sa\smobile\sphone/tablet\sdevice.\sTo\sachieve\sthis\sI\sdo\sthe\sfollowing:\r\n
    \r\n
  1. Write\sdown\sthe\starget\sdevice's\sdensitydpi\sand\sdensity,\sas\sreturned\sby\sthe\scommand\s`borg\sdisplaymetrics`\srun\son\sandrowish\son\sthe\smobile\sdevice.\sAn\sexample\sof\ssuch\sresult\sfrom\san\sactual\sdevice\sis:\s`densitydpi\s240\sdensity\s1.5`
  2. \r\n
  3. On\sthe\sPC,\srun\s`undroidwish\s-sdlxdpi\s`,\swhere\s\sis\sthe\svalue\sreturned\sby\sthe\sabove\s`borg\sdisplaymetrics`\scommand.
  4. \r\n
  5. Inside\sundroidwish,\srun\sthe\sfollowing\scode:
  6. \r\n
    \r\n%\stk\sscaling\r\n3.344855967078189\r\n#\sset\s`tk\sscaling`\sto\sthe\s\svalue\sreturn\sby\s`borg\sdisplaymetrics`\r\n%\stk\sscaling\s1.5\r\n#\screate\sa\sshape\swith\sspecs\sdependent\son\sdevice\sdpi:\r\n%\spack\s[frame\s.f\s-width\s20m\s-height\s20m\s-bg\sred]\s-padx\s20m\s-pady\s20m\s\r\n
    \r\n
  7. Measure\sthe\sred\srectangular\srepresenting\sthe\sspecified\stk\sframe\swidget.\sResult:\sIt\smeasures\sexactly\sthe\sspecified\s20mm.
  8. \r\n
\r\nSo\sI\sconclude\sthat\sthis\smethod\sgives\san\sadequate\ssolution\sto\sthe\sset\sgoal.\sNow\sthe\sproblem:\r\n

\r\nWhile\stk\sseems\sto\sbe\scorrectly\sset\sto\sdisplay\sthe\scontent,\sthe\ssdltk\swindow\sborders\sare\sscaled\sby\sthe\s-sdlxdpi\svalue\sgiven\sat\sthe\scommand\sline,\swhich\sseems\sto\sbe\sapprox.\s240.0/72\s=\s3.333..,\sin\sthe\sabove\sexample.\sSee\sthis\sscreenshot.\sThe\ssize\sof\sthe\sfont\sin\sthe\sconsole\sis\snot\sa\sproblem;\sit\swill\sresize\sproperly\sonce\sthe\sconsole\sis\sredrawn\sby\sTk.\sBut...\r\n

\r\nI\shave\snot\sfound\sa\sway\sto\sset\ssdltk's\swindow\sborders.\sTk\scommands\sfor\stoplevel\swindows\sdo\snot\sseem\sto\sinfluence\ssdltk's\swindow\sdecoration\sin\sundroidwish.\sI\scan\smake\sthem\sdisappear,\se.g.\sby\srunning\s`wm\soverrideredirect`,\sbut\sthen\sthe\sability\sto\smove\sthe\swindows\saround\sis\slost.\s\r\n

\r\nHow\scan\sone\schange\swindow\sdecoration\ssizes\sin\ssdltk?\sIt\sseems\sthey\sshould\sbe\stied\sto\sthe\s`tk\sscaling`\sthat\sundroidwish\scomes\sup\swith\sinitially. J login anonymous J mimetype text/html K 0c7dac6fccdf5eb668b2073c6cc7777712944c29 U anonymous Z 2e4bbe501bac30c8245a9c0ccd113359