From 769fc2a150f73f9fff48f72ce6f7d9a42ce0e366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Thu, 20 Apr 2017 20:30:03 +0200 Subject: Introduce gaps between buttons and content. This was necessary because of the new button texture. --- plugingui/diskstreamingframecontent.cc | 6 ++++-- plugingui/drumkitframecontent.cc | 5 +++-- plugingui/drumkitframecontent.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'plugingui') diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc index 228702f..b4c2c7c 100644 --- a/plugingui/diskstreamingframecontent.cc +++ b/plugingui/diskstreamingframecontent.cc @@ -70,12 +70,14 @@ void DiskstreamingframeContent::resize(std::size_t width, std::size_t height) { Widget::resize(width, height); + std::size_t slider_button_gap = 10; + slider_width = 0.8 * width; - button_width = width - slider_width; + button_width = width - slider_width - slider_button_gap; label_text.move(0, 0); slider.move(0, 20); - button.move(slider_width, 10); + button.move(slider_width + slider_button_gap, 10); label_size.move(0, 40); label_text.resize(slider_width, 15); diff --git a/plugingui/drumkitframecontent.cc b/plugingui/drumkitframecontent.cc index ea830fa..c16bb5a 100644 --- a/plugingui/drumkitframecontent.cc +++ b/plugingui/drumkitframecontent.cc @@ -39,6 +39,7 @@ BrowseFile::BrowseFile(Widget* parent) { layout.setResizeChildren(false); layout.setVAlignment(VAlignment::center); + layout.setSpacing(gap); layout.addItem(&lineedit); layout.addItem(&browse_button); @@ -50,8 +51,8 @@ void BrowseFile::resize(std::size_t width, std::size_t height) { Widget::resize(width, height); - lineedit_width = 0.72 * width; - button_width = width - lineedit_width; + lineedit_width = 0.72 * width - gap; + button_width = width - lineedit_width - gap; lineedit.resize(lineedit_width, 29); browse_button.resize(button_width, 30); diff --git a/plugingui/drumkitframecontent.h b/plugingui/drumkitframecontent.h index 1eb495f..c6e0942 100644 --- a/plugingui/drumkitframecontent.h +++ b/plugingui/drumkitframecontent.h @@ -63,6 +63,7 @@ private: std::size_t lineedit_width; std::size_t button_width; + std::size_t gap{10}; }; class DrumkitframeContent -- cgit v1.2.3