-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TransitionMod: replace WidgetMultiLines with single line
- Loading branch information
1 parent
8fc804f
commit cd46621
Showing
13 changed files
with
156 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
SPDX-FileCopyrightText: 2024 Wallix Proxies Team | ||
SPDX-License-Identifier: GPL-2.0-or-later | ||
*/ | ||
|
||
#include "gdi/draw_utils.hpp" | ||
#include "utils/sugar/numerics/safe_conversions.hpp" | ||
#include "core/RDP/orders/RDPOrdersPrimaryOpaqueRect.hpp" | ||
|
||
|
||
void gdi_draw_border( | ||
gdi::GraphicApi& drawable, RDPColor color, | ||
int16_t x, int16_t y, uint16_t cx, uint16_t cy, | ||
uint16_t border_width, Rect clip, gdi::ColorCtx color_ctx) | ||
{ | ||
auto draw = [&](Rect rect){ | ||
drawable.draw(RDPOpaqueRect(rect, color), clip, color_ctx); | ||
}; | ||
|
||
// top | ||
draw(Rect(x, y, cx - border_width, border_width)); | ||
// left | ||
draw(Rect(x, checked_int(y + border_width), border_width, cy - border_width)); | ||
// right | ||
draw(Rect(checked_int(x + cx - border_width), y, border_width, cy)); | ||
// bottom | ||
draw(Rect(x, checked_int(y + cy - border_width), cx - border_width, border_width)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
SPDX-FileCopyrightText: 2024 Wallix Proxies Team | ||
SPDX-License-Identifier: GPL-2.0-or-later | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "gdi/graphic_api.hpp" | ||
|
||
|
||
void gdi_draw_border( | ||
gdi::GraphicApi& drawable, RDPColor color, | ||
int16_t x, int16_t y, uint16_t cx, uint16_t cy, | ||
uint16_t border_width, Rect clip, gdi::ColorCtx color_ctx | ||
); | ||
|
||
inline void gdi_draw_border( | ||
gdi::GraphicApi& drawable, RDPColor color, | ||
Rect rect, uint16_t border_width, Rect clip, gdi::ColorCtx color_ctx | ||
) | ||
{ | ||
gdi_draw_border(drawable, color, rect.x, rect.y, rect.cx, rect.cy, border_width, clip, color_ctx); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,8 @@ | |
|
||
#pragma once | ||
|
||
class Dimension; | ||
#include "utils/rect.hpp" | ||
|
||
namespace gdi | ||
{ | ||
class GraphicApi; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.