MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / DragRegion

Method DragRegion

Xaml/Pages/FramelessPage.cpp:46–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 wf::Rect FramelessPage::DragRegion()
47 {
48 if (!ExpandIntoTitlebar())
49 {
50 const auto titlebar = Titlebar();
51 const double titlebarHeight = titlebar.ActualHeight();
52 const float controlsPosition = CustomTitlebarControls().ActualOffset().x;
53
54 return {
55 FlowDirection() == wux::FlowDirection::LeftToRight ? 0.0f : static_cast<float>(titlebar.ActualWidth() - controlsPosition),
56 0.0f,
57 controlsPosition,
58 static_cast<float>(titlebarHeight)
59 };
60 }
61 else
62 {
63 return ExpandedDragRegion();
64 }
65 }
66
67 wf::Rect FramelessPage::ExpandedDragRegion()
68 {

Callers 1

GetXamlSizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected