From 95b7c77409ca38b19675536774709d8c5dac4692 Mon Sep 17 00:00:00 2001 From: Peter Ganzhorn Date: Fri, 1 May 2015 10:57:26 +0200 Subject: Fix shaped toolbar being drawn incorrectly at TOPCENTER Fix round corners being drawn incorrectly on the TOP instead BOTTOM of the toolbar when toolbar placement is TOPCENTER. Also align the _values[] table a bit more nicely to make it easier to spot bugs like this. The bug was introduced in commit 67c31b49bdeab40fea37719cd6cfa06b37507e3e 'Refactor Toolbar.cc, less noise'. --- src/Toolbar.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 933c217..7ef5f13 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -81,17 +81,17 @@ const struct { } _values[] = { { /* unused */ }, { Toolbar::TOPLEFT, "TopLeft", FbTk::ROT0, FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT}, - { Toolbar::TOPCENTER, "TopCenter", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, + { Toolbar::TOPCENTER, "TopCenter", FbTk::ROT0, FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT}, { Toolbar::TOPRIGHT, "TopRight", FbTk::ROT0, FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT}, - { Toolbar::BOTTOMLEFT, "BottomLeft", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, - { Toolbar::BOTTOMCENTER, "BottomCenter", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, - { Toolbar::BOTTOMRIGHT, "BottomRight", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, - { Toolbar::LEFTBOTTOM, "LeftBottom", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, - { Toolbar::LEFTCENTER, "LeftCenter", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, - { Toolbar::LEFTTOP, "LeftTop", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, - { Toolbar::RIGHTBOTTOM, "RightBottom", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, - { Toolbar::RIGHTCENTER, "RightCenter", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, - { Toolbar::RIGHTTOP, "RightTop", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, + { Toolbar::BOTTOMLEFT, "BottomLeft", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, + { Toolbar::BOTTOMCENTER, "BottomCenter", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, + { Toolbar::BOTTOMRIGHT, "BottomRight", FbTk::ROT0, FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT}, + { Toolbar::LEFTBOTTOM, "LeftBottom", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, + { Toolbar::LEFTCENTER, "LeftCenter", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, + { Toolbar::LEFTTOP, "LeftTop", FbTk::ROT270, FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT}, + { Toolbar::RIGHTBOTTOM, "RightBottom", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, + { Toolbar::RIGHTCENTER, "RightCenter", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, + { Toolbar::RIGHTTOP, "RightTop", FbTk::ROT90, FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT}, }; } -- cgit v0.11.2