mirror of https://gitee.com/cxasm/notepad--.git
plugin/versionUpdate: 添加在 Windows 下的插件 icon 图标资源
This commit is contained in:
parent
d7d44985a6
commit
93a6b86cd0
|
@ -19,7 +19,7 @@ if(TRUE)
|
|||
.
|
||||
StatusWidget
|
||||
)
|
||||
spark_add_library(${LOCAL_PLUGIN_NAME} SHARED ${LocalSources})
|
||||
spark_add_library(${LOCAL_PLUGIN_NAME} SHARED ${LocalSources} "plugin.qrc")
|
||||
target_include_directories(${LOCAL_PLUGIN_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/src/cceditor
|
||||
|
|
|
@ -73,7 +73,7 @@ void StatusWidget::initializeIcon()
|
|||
|
||||
void StatusWidget::setIcon(QPixmap iconPixmap)
|
||||
{
|
||||
ui->icon->setPixmap(iconPixmap);
|
||||
ui->icon->setPixmap(iconPixmap.scaled(ui->icon->size()));
|
||||
}
|
||||
|
||||
QPixmap StatusWidget::getIcon() {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -23,7 +23,11 @@ NddPluginImplement::NddPluginImplement(QWidget *parent, QsciScintilla *pEdit) :
|
|||
statusWidget->setDirection(StatusWidget::TopIn, StatusWidget::RightOut);
|
||||
statusWidget->start(false);
|
||||
statusWidget->show();
|
||||
#ifdef Q_OS_WIN
|
||||
statusWidget->setIcon(QPixmap("://assets/5.png"));
|
||||
#else
|
||||
statusWidget->setIcon(QIcon::fromTheme("notepad--").pixmap(32,32));
|
||||
#endif
|
||||
statusWidget->setStyleSheet("border-radius: 8px");
|
||||
QNetworkAccessManager manager;
|
||||
QEventLoop loop;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>assets/5.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue