Sublime: Fix window growing larger by making tool view buttons shrinkable

Authored by amhndu on Sep 12 2018, 12:10 PM.

Description

Sublime: Fix window growing larger by making tool view buttons shrinkable

Summary:
Items will be shrinked in the IdealButtonBarLayout, instead of
overflowing and forcing the window larger.
Geometries are calculated so that only the bigger will be contracted
while items smaller than a relative threshold won't contract.
Consequently, the window will no longer grow when changing from Debug to Code.

IdealToolButtons: Instead of simply truncating text, they will elide text while painting.

IdealButtonBarWidget: Previously the layout attached to the object was being used to add
buttons, which for the bottom bar wrongly meant a super-layout while the
IdealButtonBarLayout added to this super-layout was being ignored, introduced a new
member to use the proper layout for all orientations.

BUG: 384711

Reviewers: KDevelop, kossebau

Reviewed By: KDevelop, kossebau

Subscribers: kossebau, kdevelop-devel

Tags: KDevelop

Differential Revision: https://phabricator.kde.org/D15450