[commit] r2544 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Sep 26 09:12:34 CDT 2014
Author: ksmyth
Date: Fri Sep 26 09:12:34 2014
New Revision: 2544
Log:
Make connections bolder at low zoom
Modified:
trunk/GME/Gme/GUIObject.cpp
Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp Fri Sep 26 08:15:01 2014 (r2543)
+++ trunk/GME/Gme/GUIObject.cpp Fri Sep 26 09:12:34 2014 (r2544)
@@ -2694,9 +2694,15 @@
std::vector<long> customizedEdgeIndexes;
if (selected && IsAutoRouted())
customizedEdgeIndexes = GetRelevantCustomizedEdgeIndexes();
+ int width = selected ? 3 : hovered ? 5 : 1;
+ if (selected && view->m_zoomVal < ZOOM_NO)
+ {
+ // selection was hard to see at <100% zoom. Magic numbers determined by experimentation
+ width = (int)((float)((ZOOM_NO - 25) / max(10, view->m_zoomVal) + 0.2) * width + 0.5f);
+ }
graphics.DrawConnection(gdip, points, customizedEdgeIndexes, grayedOut ? GME_GRAYED_OUT_COLOR : color,
lineType, srcStyle, dstStyle, view->m_zoomVal > ZOOM_NO, !IsAutoRouted() && selected,
- selected ? 3 : hovered ? 5 : 1);
+ width);
if (points.GetSize() < 2) {
ASSERT(false);
More information about the gme-commit
mailing list