From 54f989f6f53d7c4353045ce712f912a78b7f058f Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 8 Jan 2019 14:25:28 +0100 Subject: [PATCH] ui: Also elide name of active node if it has more than 100 characters (issue #652) --- bin/app/user/projects/tictactoe/src/main.cpp | 2 +- src/lib/component/controller/GraphController.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/app/user/projects/tictactoe/src/main.cpp b/bin/app/user/projects/tictactoe/src/main.cpp index 8d15ea5f..19896185 100644 --- a/bin/app/user/projects/tictactoe/src/main.cpp +++ b/bin/app/user/projects/tictactoe/src/main.cpp @@ -1,6 +1,6 @@ #include "tictactoe.h" -int main() { +int maintictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoetictactoe() { TicTacToe tictactoe; while ( tictactoe.Start() ) { diff --git a/src/lib/component/controller/GraphController.cpp b/src/lib/component/controller/GraphController.cpp index ed060619..8f77989e 100644 --- a/src/lib/component/controller/GraphController.cpp +++ b/src/lib/component/controller/GraphController.cpp @@ -1891,11 +1891,7 @@ void GraphController::layoutNestingRecursive(DummyNode* node) const if (node->isGraphNode()) { - if (!node->active) - { - node->name = utility::elide(node->name, utility::ELIDE_RIGHT, 50); - } - + node->name = utility::elide(node->name, utility::ELIDE_RIGHT, node->active ? 100 : 50); width = margins.charWidth * node->name.size(); if (node->data->getType().isCollapsible() && node->data->getChildCount() > 0)