Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StandardNodeGadget : Remove raster-space sizing for focus border #5468

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
1.2.10.x (relative to 1.2.10.3)
========

Fixes
-----

- GraphEditor : Removed dynamic raster-space sizing of focus icon, as it caused excessive overlap with other nodes at certain zoom levels and on certain high resolution displays (#5435).

1.2.10.3 (relative to 1.2.10.2)
========
Expand Down
7 changes: 1 addition & 6 deletions src/GafferUI/StandardNodeGadget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,12 +778,7 @@ void StandardNodeGadget::renderLayer( Layer layer, const Style *style, RenderRea

float StandardNodeGadget::focusBorderWidth() const
{
// Compute a fixed size in raster space, clamped to a maximum
const ViewportGadget *viewport = ancestor<ViewportGadget>();
const V3f p0 = viewport->rasterToGadgetSpace( V2f( 0 ), this ).p0;
const V3f p1 = viewport->rasterToGadgetSpace( V2f( 0, 1.0f ), this ).p0;
float pixelSize = ( p0 - p1 ).length();
return min( g_maxFocusWidth, max( 0.75f, 8.0f * pixelSize ) );
return 0.8;
}

void StandardNodeGadget::setHighlighted( bool highlighted )
Expand Down
Loading