mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Removed action icons in the parts widget edits.
Some checks failed
LeoCAD CI / build-ubuntu (push) Has been cancelled
LeoCAD CI / build-macos (push) Has been cancelled
Some checks failed
LeoCAD CI / build-ubuntu (push) Has been cancelled
LeoCAD CI / build-macos (push) Has been cancelled
This commit is contained in:
parent
9edd8f95ed
commit
e69bbf5460
9 changed files with 83 additions and 17 deletions
|
@ -84,7 +84,7 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R
|
|||
|
||||
QToolButton* CloseButton = new QToolButton(this);
|
||||
CloseButton->setAutoRaise(true);
|
||||
CloseButton->setIcon(QIcon(":/stylesheet/close.png"));
|
||||
CloseButton->setIcon(QIcon(":/stylesheet/close.svg"));
|
||||
CloseButton->setToolTip(tr("Close"));
|
||||
Layout->addWidget(CloseButton, 0, 5);
|
||||
|
||||
|
|
|
@ -627,7 +627,7 @@ void lcPartSelectionListView::startDrag(Qt::DropActions SupportedActions)
|
|||
}
|
||||
|
||||
lcPartSelectionWidget::lcPartSelectionWidget(QWidget* Parent)
|
||||
: QWidget(Parent), mFilterAction(nullptr)
|
||||
: QWidget(Parent)
|
||||
{
|
||||
mSplitter = new QSplitter(this);
|
||||
mSplitter->setOrientation(Qt::Vertical);
|
||||
|
@ -645,8 +645,6 @@ lcPartSelectionWidget::lcPartSelectionWidget(QWidget* Parent)
|
|||
|
||||
mFilterCategoriesWidget = new QLineEdit(CategoriesGroupWidget);
|
||||
mFilterCategoriesWidget->setPlaceholderText(tr("Filter Categories"));
|
||||
mFilterCategoriesAction = mFilterCategoriesWidget->addAction(QIcon(":/resources/filter.png"), QLineEdit::TrailingPosition);
|
||||
connect(mFilterCategoriesAction, SIGNAL(triggered()), this, SLOT(FilterCategoriesTriggered()));
|
||||
FilterCategoriesLayout->addWidget(mFilterCategoriesWidget);
|
||||
|
||||
mFilterCaseAction = new QAction();
|
||||
|
@ -679,8 +677,6 @@ lcPartSelectionWidget::lcPartSelectionWidget(QWidget* Parent)
|
|||
|
||||
mFilterWidget = new QLineEdit(PartsGroupWidget);
|
||||
mFilterWidget->setPlaceholderText(tr("Search Parts"));
|
||||
mFilterAction = mFilterWidget->addAction(QIcon(":/resources/parts_search.png"), QLineEdit::TrailingPosition);
|
||||
connect(mFilterAction, SIGNAL(triggered()), this, SLOT(FilterTriggered()));
|
||||
SearchLayout->addWidget(mFilterWidget);
|
||||
|
||||
QToolButton* OptionsButton = new QToolButton();
|
||||
|
@ -814,9 +810,18 @@ void lcPartSelectionWidget::FilterCategoriesChanged(const QString& Text)
|
|||
if (mFilterCategoriesAction)
|
||||
{
|
||||
if (Text.isEmpty())
|
||||
mFilterCategoriesAction->setIcon(QIcon(":/resources/filter.png"));
|
||||
else
|
||||
mFilterCategoriesAction->setIcon(QIcon(":/resources/parts_cancel.png"));
|
||||
{
|
||||
delete mFilterCategoriesAction;
|
||||
mFilterCategoriesAction = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Text.isEmpty())
|
||||
{
|
||||
mFilterCategoriesAction = mFilterCategoriesWidget->addAction(QIcon(":/stylesheet/close.svg"), QLineEdit::TrailingPosition);
|
||||
connect(mFilterCategoriesAction, &QAction::triggered, this, &lcPartSelectionWidget::FilterCategoriesTriggered);
|
||||
}
|
||||
}
|
||||
|
||||
bool Hide = true;
|
||||
|
@ -839,9 +844,18 @@ void lcPartSelectionWidget::FilterChanged(const QString& Text)
|
|||
if (mFilterAction)
|
||||
{
|
||||
if (Text.isEmpty())
|
||||
mFilterAction->setIcon(QIcon(":/resources/parts_search.png"));
|
||||
else
|
||||
mFilterAction->setIcon(QIcon(":/resources/parts_cancel.png"));
|
||||
{
|
||||
delete mFilterAction;
|
||||
mFilterAction = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Text.isEmpty())
|
||||
{
|
||||
mFilterAction = mFilterWidget->addAction(QIcon(":/stylesheet/close.svg"), QLineEdit::TrailingPosition);
|
||||
connect(mFilterAction, &QAction::triggered, this, &lcPartSelectionWidget::FilterTriggered);
|
||||
}
|
||||
}
|
||||
|
||||
mPartsWidget->GetListModel()->SetFilter(Text);
|
||||
|
|
|
@ -110,8 +110,6 @@
|
|||
<file>resources/piece_show_earlier.png</file>
|
||||
<file>resources/piece_show_later.png</file>
|
||||
<file>resources/time_add_keys.png</file>
|
||||
<file>resources/parts_search.png</file>
|
||||
<file>resources/parts_cancel.png</file>
|
||||
<file>resources/archive.png</file>
|
||||
<file>resources/library.zip</file>
|
||||
<file>resources/studlogo1.zip</file>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 867 B |
Binary file not shown.
Before Width: | Height: | Size: 2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 254 B |
54
resources/stylesheet/close.svg
Normal file
54
resources/stylesheet/close.svg
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
height="18"
|
||||
viewBox="0 0 18 18"
|
||||
width="18"
|
||||
version="1.1"
|
||||
id="svg11"
|
||||
sodipodi:docname="Smock_Close_18_N.svg"
|
||||
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview13"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="39.944444"
|
||||
inkscape:cx="9"
|
||||
inkscape:cy="8.9874826"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg11" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">
|
||||
.fill {
|
||||
fill: #464646;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">S Close 18 N</title>
|
||||
<rect
|
||||
id="Canvas"
|
||||
fill="#ff13dc"
|
||||
opacity="0"
|
||||
width="18"
|
||||
height="18" />
|
||||
<path
|
||||
class="fill"
|
||||
d="M13.2425,3.343,9,7.586,4.7575,3.343a.5.5,0,0,0-.707,0L3.343,4.05a.5.5,0,0,0,0,.707L7.586,9,3.343,13.2425a.5.5,0,0,0,0,.707l.707.7075a.5.5,0,0,0,.707,0L9,10.414l4.2425,4.243a.5.5,0,0,0,.707,0l.7075-.707a.5.5,0,0,0,0-.707L10.414,9l4.243-4.2425a.5.5,0,0,0,0-.707L13.95,3.343a.5.5,0,0,0-.70711-.00039Z"
|
||||
id="path9"
|
||||
style="fill:#b3b3b3" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -6,7 +6,7 @@
|
|||
<file>branch_more.png</file>
|
||||
<file>branch_open.png</file>
|
||||
<file>branch_vline.png</file>
|
||||
<file>close.png</file>
|
||||
<file>close.svg</file>
|
||||
<file>undock.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -48,7 +48,7 @@ QTreeView::branch:open:has-children:!has-siblings {
|
|||
}
|
||||
|
||||
QDockWidget {
|
||||
titlebar-close-icon: url(:/stylesheet/close.png);
|
||||
titlebar-close-icon: url(:/stylesheet/close.svg);
|
||||
titlebar-normal-icon: url(:/stylesheet/undock.png);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ QDockWidget::float-button:pressed {
|
|||
}
|
||||
|
||||
QTabBar::close-button {
|
||||
background-image: url(:/stylesheet/close.png);
|
||||
background-image: url(:/stylesheet/close.svg);
|
||||
background-position: center center;
|
||||
background-repeat: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue