Skip to content

Commit

Permalink
Better button
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 11, 2015
1 parent 369ed8c commit ff7d605
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions base/lib/resources/LICENSES
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
forward.svg part of Entypo, licensed under CC BY-SA 4.0
7 changes: 7 additions & 0 deletions base/lib/resources/forward.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions base/lib/resources/iscore.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>Ubuntu-R.ttf</file>
<file>iscore.png</file>
</qresource>
<RCC>
<qresource prefix="/">
<file>Ubuntu-R.ttf</file>
<file>iscore.png</file>
<file>forward.svg</file>
</qresource>
</RCC>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <QPushButton>
#include <iscore/selection/SelectionDispatcher.hpp>
#include <iscore/widgets/MarginLess.hpp>

#include <QIcon>
SelectionButton::SelectionButton(
const QString &text,
Selection target,
Expand All @@ -15,6 +15,7 @@ SelectionButton::SelectionButton(
auto lay = new iscore::MarginLess<QHBoxLayout>;

m_button = new QPushButton{tr("None")}; // TODO clickable label instead
m_button->setIcon(QIcon(":/forward.svg"));
m_button->setStyleSheet ("margin: 5px; margin-left: 10px; text-align: left; text-decoration: underline");
m_button->setFlat(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class QPushButton;
namespace iscore {
class SelectionDispatcher;
}
class SelectionButton : public QWidget
class
SelectionButton : public QWidget
{
public:
SelectionButton(const QString& text,
Expand All @@ -20,7 +21,7 @@ class SelectionButton : public QWidget
QWidget* parent)
{
return new SelectionButton{
QString::number(*obj->id().val()) + "",
QString::number(*obj->id().val()),
Selection{obj},
disp,
parent};
Expand All @@ -34,7 +35,7 @@ class SelectionButton : public QWidget
QWidget* parent)
{
auto but = new SelectionButton{
text + "",
text,
Selection{obj},
disp,
parent};
Expand Down

0 comments on commit ff7d605

Please sign in to comment.