Fixed Linux specific rendering bug
This commit is contained in:
parent
63d00adf96
commit
a20e5849f5
4 changed files with 9 additions and 4 deletions
|
|
@ -23,6 +23,7 @@
|
||||||
Add theme caching
|
Add theme caching
|
||||||
Implement cursors in Stylesheet
|
Implement cursors in Stylesheet
|
||||||
FIX: Window getting exponentially bigger when Desktop scale changes
|
FIX: Window getting exponentially bigger when Desktop scale changes
|
||||||
|
FIX: Refreshing scroll when content extent changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2070
|
2071
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ namespace ogfx
|
||||||
{
|
{
|
||||||
if (isVScrollAllowed())
|
if (isVScrollAllowed())
|
||||||
{
|
{
|
||||||
bool mouseInsideHScrollbar = m_hScrollbar.isMouseInsideThumb({ event.mouse->position_x, event.mouse->position_y });
|
bool mouseInsideHScrollbar = m_hScrollbar.isMouseInsideThumb({ event.mouse->position_x, event.mouse->position_y }) && needsHScroll();
|
||||||
if (std::abs(event.mouse->scrollAmount.y) > 0 && !mouseInsideHScrollbar)
|
if (std::abs(event.mouse->scrollAmount.y) > 0 && !mouseInsideHScrollbar)
|
||||||
{
|
{
|
||||||
m_scrollVelocity.y += m_scrollSpeed * event.mouse->scrollAmount.y * m_scrollSpeedMultiplier;
|
m_scrollVelocity.y += m_scrollSpeed * event.mouse->scrollAmount.y * m_scrollSpeedMultiplier;
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ namespace ogfx
|
||||||
{
|
{
|
||||||
if (!child || child->isInvalid()) continue;
|
if (!child || child->isInvalid()) continue;
|
||||||
if (child->isIgnoreScrollAllowed()) continue;
|
if (child->isIgnoreScrollAllowed()) continue;
|
||||||
|
if (!child->isVisible()) continue;
|
||||||
Vec2 localPos = getPadding().getPosition() + child->getPosition() + child->getMargin().getPosition() + child->getContentBounds().getPosition();
|
Vec2 localPos = getPadding().getPosition() + child->getPosition() + child->getMargin().getPosition() + child->getContentBounds().getPosition();
|
||||||
maxX = std::max(maxX, localPos.x + child->getw() + child->getMargin().w);
|
maxX = std::max(maxX, localPos.x + child->getw() + child->getMargin().w);
|
||||||
maxY = std::max(maxY, localPos.y + child->geth() + child->getMargin().h);
|
maxY = std::max(maxY, localPos.y + child->geth() + child->getMargin().h);
|
||||||
|
|
@ -230,9 +231,12 @@ namespace ogfx
|
||||||
onDraw(gfx);
|
onDraw(gfx);
|
||||||
|
|
||||||
// gfx.fillRect(getGlobalPureContentBounds(), { 0, 255, 0, 120 });
|
// gfx.fillRect(getGlobalPureContentBounds(), { 0, 255, 0, 120 });
|
||||||
|
const bool needsContentClip = !m_rootChild;
|
||||||
|
if (needsContentClip)
|
||||||
gfx.pushClippingRect(getGlobalPureContentBounds(), true);
|
gfx.pushClippingRect(getGlobalPureContentBounds(), true);
|
||||||
if (hasChildren())
|
if (hasChildren())
|
||||||
m_widgets.draw(gfx);
|
m_widgets.draw(gfx);
|
||||||
|
if (needsContentClip)
|
||||||
gfx.popClippingRect();
|
gfx.popClippingRect();
|
||||||
if (m_showBorder)
|
if (m_showBorder)
|
||||||
gfx.drawRoundRect({ getGlobalPosition(), getSize() }, m_borderColor, m_borderRadius, m_borderWidth);
|
gfx.drawRoundRect({ getGlobalPosition(), getSize() }, m_borderColor, m_borderRadius, m_borderWidth);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue