Skip to content

Commit

Permalink
Add no-wrap attribute to static text to avoid wrapping
Browse files Browse the repository at this point in the history
Issue #96 points out that at some scaling levels (such as 125%) the text
in some static text controls in UIforETW partially disappears. This is
because the static text controls are very tightly fit, and because
text wrappin is enabled. I also widened some of the text controls to
make clipping less likely.

<rant>The relevant flag is displayed in the properties dialog in Visual
Studio as "No Wrap" with a default of False, which means that wrapping
is True, and it means that Visual Studio loves double negatives, despite
whatever confusion they might cause. And, the default is probably
incorrect given that most static text controls are single line.</rant>
  • Loading branch information
randomascii committed Jan 28, 2017
1 parent ddd4c89 commit b919c2a
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions UIforETW/UIforETW.rc
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ CAPTION "About UI for ETW"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,14,14,20,20
LTEXT "UI for ETW",IDC_STATIC,42,14,114,8,SS_NOPREFIX
LTEXT "Copyright 2015 Google Inc. All Rights Reserved.",IDC_STATIC,42,26,162,8
CONTROL "UI for ETW",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,42,14,114,8
CONTROL "Copyright 2015 Google Inc. All Rights Reserved.",IDC_STATIC,
"Static",SS_LEFTNOWORDWRAP | WS_GROUP,42,26,162,8
DEFPUSHBUTTON "OK",IDOK,154,61,50,14,WS_GROUP
LTEXT "Initially/mostly written by Bruce Dawson",IDC_STATIC,42,38,162,8
LTEXT "Build date goes here",IDC_BUILDDATE,42,50,134,8
CONTROL "Initially/mostly written by Bruce Dawson",IDC_STATIC,
"Static",SS_LEFTNOWORDWRAP | WS_GROUP,42,38,162,8
CONTROL "Build date goes here",IDC_BUILDDATE,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,42,50,134,8
END

IDD_UIFORETW_DIALOG DIALOGEX 0, 0, 569, 221
Expand All @@ -114,37 +116,37 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,464,48,93,10
CONTROL "&Fast sampling",IDC_FASTSAMPLING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,464,60,59,10
CONTROL "&GPU tracing",IDC_GPUTRACING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,464,72,53,10
LTEXT "&Input tracing:",IDC_INPUTTRACING_LABEL,464,99,45,8
CONTROL "&Input tracing:",IDC_INPUTTRACING_LABEL,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,464,99,45,8
COMBOBOX IDC_INPUTTRACING,511,97,51,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_TRACINGMODE,464,116,98,133,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "S&how commands",IDC_SHOWCOMMANDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,464,133,69,10
LTEXT "T&races:",IDC_STATIC,7,135,25,8
CONTROL "T&races:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,135,36,8
LISTBOX IDC_TRACELIST,7,146,227,68,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "Trace inform&ation:",IDC_STATIC,239,135,60,8
CONTROL "Trace inform&ation:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,239,135,69,8
EDITTEXT IDC_TRACENOTES,239,146,323,68,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
EDITTEXT IDC_TRACENAMEEDIT,75,144,160,14,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | NOT WS_TABSTOP
CONTROL "&CLR tracing",IDC_CLRTRACING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,464,84,53,10
LTEXT "Trace size:",IDC_TRACESIZE,94,135,76,8
CONTROL "Trace size:",IDC_TRACESIZE,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,94,135,76,8
END

IDD_SETTINGS DIALOGEX 0, 0, 401, 197
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "&Heap-profiled processes:",IDC_STATIC,7,9,81,8
EDITTEXT IDC_HEAPEXE,95,7,133,14,ES_AUTOHSCROLL
LTEXT "&WS monitored processes:",IDC_WS_MONITOR_STATIC,7,25,82,8
EDITTEXT IDC_WSMONITOREDPROCESSES,95,22,133,14,ES_AUTOHSCROLL
CONTROL "&Heap-profiled processes:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,9,94,8
EDITTEXT IDC_HEAPEXE,102,7,133,14,ES_AUTOHSCROLL
CONTROL "&WS monitored processes:",IDC_WS_MONITOR_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,25,94,8
EDITTEXT IDC_WSMONITOREDPROCESSES,102,22,133,14,ES_AUTOHSCROLL
CONTROL "E&xpensive working set monitoring",IDC_EXPENSIVEWS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,39,123,10
LTEXT "Extra kernel &flags:",IDC_STATIC,7,58,60,8
EDITTEXT IDC_EXTRAKERNELFLAGS,95,56,133,14,ES_AUTOHSCROLL
LTEXT "Extra &kernel stackwalks:",IDC_STATIC,7,75,78,8
EDITTEXT IDC_EXTRASTACKWALKS,95,73,133,14,ES_AUTOHSCROLL
LTEXT "Extra &user mode providers:",IDC_STATIC,7,93,88,8
EDITTEXT IDC_EXTRAUSERMODEPROVIDERS,95,91,133,14,ES_AUTOHSCROLL
LTEXT "Perf counters:",IDC_STATIC,7,112,47,8
CONTROL "Extra kernel &flags:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,58,92,8
EDITTEXT IDC_EXTRAKERNELFLAGS,102,56,133,14,ES_AUTOHSCROLL
CONTROL "Extra &kernel stackwalks:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,75,92,8
EDITTEXT IDC_EXTRASTACKWALKS,102,73,133,14,ES_AUTOHSCROLL
CONTROL "Extra &user mode providers:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,93,92,8
EDITTEXT IDC_EXTRAUSERMODEPROVIDERS,102,91,133,14,ES_AUTOHSCROLL
CONTROL "Perf counters:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,7,112,52,8
PUSHBUTTON "&Copy startup profiles",IDC_COPYSTARTUPPROFILE,7,144,75,14
CONTROL "Use other kernel logger",IDC_USE_OTHER_KERNEL_LOGGER,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,180,91,10
Expand All @@ -154,12 +156,12 @@ BEGIN
CONTROL "&VirtualAlloc stacks always",IDC_VIRTUALALLOCSTACKS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,167,97,10
CONTROL "Check for new versions",IDC_CHECKFORNEWVERSIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,180,105,10
LTEXT "Chrome tracing cate&gories:",IDC_STATIC,245,7,131,8
CONTROL "Chrome tracing cate&gories:",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,245,7,131,8
LISTBOX IDC_CHROME_CATEGORIES,245,18,149,155,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,286,176,50,14
PUSHBUTTON "Cancel",IDCANCEL,344,176,50,14
PUSHBUTTON "Se&lect...",IDC_SELECT_PERF_COUNTERS,55,109,38,14
EDITTEXT IDC_PERFORMANCECOUNTERS,95,109,133,14,ES_AUTOHSCROLL
PUSHBUTTON "Se&lect...",IDC_SELECT_PERF_COUNTERS,61,109,38,14
EDITTEXT IDC_PERFORMANCECOUNTERS,102,109,133,14,ES_AUTOHSCROLL
END


Expand Down

0 comments on commit b919c2a

Please sign in to comment.