Skip to content

Commit

Permalink
Merge pull request #1224 from CBATeam/fix-host-server-crash
Browse files Browse the repository at this point in the history
fix crash when hosting server with large ui scale
  • Loading branch information
commy2 committed Sep 8, 2019
2 parents a900057 + 061aa91 commit 6ea0525
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ _ctrlMaps lbSetCurSel 0;

ctrlPosition _ctrlMissions params ["_left", "_top", "_width", "_height"];

private _widthSearchBar = (_width - 11 * GUI_GRID_W) min (10 * GUI_GRID_W);

private _ctrlSearch = _display ctrlCreate ["RscEdit", IDC_SEARCH];
_ctrlSearch ctrlSetPosition [
_left + 0.1 * GUI_GRID_W,
_top,
_width - 21.2 * GUI_GRID_W,
_widthSearchBar,
GUI_GRID_H
];
_ctrlSearch ctrlCommit 0;
Expand All @@ -44,7 +46,7 @@ _ctrlSearch ctrlSetText _filter;

private _ctrlSearchButton = _display ctrlCreate ["RscButtonSearch", IDC_SEARCH_BUTTON];
_ctrlSearchButton ctrlSetPosition [
_left + _width - 21 * GUI_GRID_W,
_left + 0.1 * GUI_GRID_W + _widthSearchBar,
_top,
GUI_GRID_W,
GUI_GRID_H
Expand Down

0 comments on commit 6ea0525

Please sign in to comment.