MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / AdjustPanelPosition

Method AdjustPanelPosition

src/render_panel/gr_connected_manager.cpp:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 void GrConnectedManager::AdjustPanelPosition() {
102 auto primary_screen = QApplication::primaryScreen();
103 if (!primary_screen) {
104 return;
105 }
106 auto screen_rect = primary_screen->availableGeometry();
107 int screen_width = screen_rect.width();
108 int screen_height = screen_rect.height();
109 int index = 0;
110 for (auto& item: connected_info_panel_group_) {
111 int panel_x = screen_width - item.second->width();
112 int panel_y = screen_height - item.second->height() - 8 - item.first * item.second->height() * 1.1;
113 item.second->move(panel_x, panel_y);
114 //LOGI("index: {}, panel_x: {}, panel_y: {}", index, panel_x, panel_y);
115 ++index;
116 }
117 }
118
119 void GrConnectedManager::HideAllPanels() {
120 for (auto& item : connected_info_panel_group_) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected