MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / GetItemLogicalWidth

Method GetItemLogicalWidth

SampleApps/WebView2APISample/Toolbar.cpp:116–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116int Toolbar::GetItemLogicalWidth(Item item, int clientLogicalWidth) const
117{
118 static const int s_itemButtonLogicalWidth = 64;
119
120 int itemLogicalWidth = 0;
121 switch (item)
122 {
123 case Item_BackButton:
124 case Item_ForwardButton:
125 case Item_ReloadButton:
126 case Item_CancelButton:
127 case Item_GoButton:
128 itemLogicalWidth = s_itemButtonLogicalWidth;
129 break;
130 case Item_AddressBar:
131 itemLogicalWidth = clientLogicalWidth - s_itemButtonLogicalWidth * (Item_LAST - 1);
132 break;
133 default:
134 FAIL_FAST();
135 }
136 return itemLogicalWidth;
137}
138
139void Toolbar::UpdateFont()
140{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected