From 506e91a16c2ae76c30674a497aa2dd1af4048f56 Mon Sep 17 00:00:00 2001 From: leozide Date: Wed, 8 Feb 2017 17:47:30 -0800 Subject: [PATCH] Added extra large icons option. Fixes #17. --- common/lc_partselectionwidget.cpp | 14 ++++++++++++-- common/lc_partselectionwidget.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/lc_partselectionwidget.cpp b/common/lc_partselectionwidget.cpp index 6b82c987..ef98786b 100644 --- a/common/lc_partselectionwidget.cpp +++ b/common/lc_partselectionwidget.cpp @@ -320,8 +320,8 @@ void lcPartSelectionListModel::DrawPreview(int InfoIndex) View* View = gMainWindow->GetActiveView(); View->MakeCurrent(); lcContext* Context = View->mContext; - int Width = 128; - int Height = 128; + int Width = mIconSize * 2; + int Height = mIconSize * 2; if (!Context->BeginRenderToTexture(Width, Height)) return; @@ -444,6 +444,11 @@ void lcPartSelectionListView::CustomContextMenuRequested(QPoint Pos) LargeIcons->setChecked(mListModel->GetIconSize() == 96); IconGroup->addAction(LargeIcons); + QAction* ExtraLargeIcons = Menu->addAction(tr("Extra Large Icons"), this, SLOT(SetExtraLargeIcons())); + ExtraLargeIcons->setCheckable(true); + ExtraLargeIcons->setChecked(mListModel->GetIconSize() == 192); + IconGroup->addAction(ExtraLargeIcons); + Menu->addSeparator(); if (mListModel->GetIconSize() != 0) @@ -484,6 +489,11 @@ void lcPartSelectionListView::SetLargeIcons() SetIconSize(96); } +void lcPartSelectionListView::SetExtraLargeIcons() +{ + SetIconSize(192); +} + void lcPartSelectionListView::TogglePartNames() { bool Show = !mListModel->GetShowPartNames(); diff --git a/common/lc_partselectionwidget.h b/common/lc_partselectionwidget.h index 84224975..7de9d685 100644 --- a/common/lc_partselectionwidget.h +++ b/common/lc_partselectionwidget.h @@ -138,6 +138,7 @@ protected slots: void SetSmallIcons(); void SetMediumIcons(); void SetLargeIcons(); + void SetExtraLargeIcons(); void TogglePartNames(); void ToggleDecoratedParts(); void ToggleFixedColor();