MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / UpdateParts

Method UpdateParts

src/windows/StatusBar.cpp:288–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288void StatusBar::UpdateParts(int width)
289{
290 INT Widths[4];
291 // Part 0 - Under the guild list and channel view
292 // Part 1 - Under the message editor widget, list of typing users
293 // Part 2 - Under the send button, character count
294 // Part 3 - Under the member list, some controls, I don't know
295
296 int scaled10 = ScaleByDPI(10);
297 Widths[IDP_CNTRLS] = width;
298 Widths[IDP_CHRCNT] = width - g_MemberListWidth - scaled10 * 3 / 2;
299 Widths[IDP_TYPING] = Widths[IDP_CHRCNT] - g_SendButtonWidth - scaled10;
300 Widths[IDP_NOTIFS] = g_GuildListerWidth + g_ChannelViewListWidth + scaled10 * 3;
301
302 SendMessage(m_hwnd, SB_SETPARTS, _countof(Widths), (LPARAM) Widths);
303
304 SendMessage(m_hwnd, SB_SETTEXT, 1 | SBT_OWNERDRAW, 0);
305}

Callers 1

ProperlySizeControlsFunction · 0.80

Calls 1

ScaleByDPIFunction · 0.85

Tested by

no test coverage detected