From c6b1572785ce943ec9d3b4094eb21d85e5174702 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Mon, 24 Jan 2022 23:07:40 +0800 Subject: [PATCH 1/4] high dpi:change book icon and add dictionary icon --- editdictionaries.cc | 2 +- icons/book.svg | 284 +--- icons/dictionary.svg | 3076 ++++++++++++++++++++++++++++++++++++++++++ resources.qrc | 1 + 4 files changed, 3142 insertions(+), 221 deletions(-) create mode 100644 icons/dictionary.svg diff --git a/editdictionaries.cc b/editdictionaries.cc index 2ceea384..af9a401d 100644 --- a/editdictionaries.cc +++ b/editdictionaries.cc @@ -39,7 +39,7 @@ EditDictionaries::EditDictionaries( QWidget * parent, Config::Class & cfg_, ui.setupUi( this ); - setWindowIcon( QIcon(":/icons/bookcase.svg") ); + setWindowIcon( QIcon(":/icons/dictionary.svg") ); ui.tabs->clear(); diff --git a/icons/book.svg b/icons/book.svg index 0c29491b..0b2205d6 100644 --- a/icons/book.svg +++ b/icons/book.svg @@ -1,221 +1,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/dictionary.svg b/icons/dictionary.svg new file mode 100644 index 00000000..8def369d --- /dev/null +++ b/icons/dictionary.svg @@ -0,0 +1,3076 @@ + + + Dictionary + + + + image/svg+xml + + Dictionary + + + Ulisse Perusin + + + + + Lapo Calamandrei + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources.qrc b/resources.qrc index 28c9413d..d6a6ac0f 100644 --- a/resources.qrc +++ b/resources.qrc @@ -118,5 +118,6 @@ icons/system-search.svg icons/windows-list.svg icons/wizard.svg + icons/dictionary.svg From de25dc276b9e3b6dfddce05892cb10887f86e1d9 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Mon, 24 Jan 2022 23:17:02 +0800 Subject: [PATCH 2/4] high dpi:change 'sound dirs' icon in edit->dictionary sounddir tabs --- resources.qrc | 1 + sources.ui | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources.qrc b/resources.qrc index d6a6ac0f..97f77dd6 100644 --- a/resources.qrc +++ b/resources.qrc @@ -95,6 +95,7 @@ icons/configure.svg icons/error.svg icons/fileopen.svg + icons/folder-sound.svg icons/filesave.svg icons/folder.svg icons/folders.svg diff --git a/sources.ui b/sources.ui index 649a6a64..307cd02d 100644 --- a/sources.ui +++ b/sources.ui @@ -94,7 +94,7 @@ - :/icons/fileopen.svg:/icons/fileopen.svg + :/icons/folder-sound.svg:/icons/folder-sound.svg Sound Dirs From 9c5d7acc5ab5e7ac55daf8fac1e7a253bc5666b3 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Tue, 25 Jan 2022 22:54:17 +0800 Subject: [PATCH 3/4] high dpi:change icon --- editdictionaries.cc | 2 +- helpwindow.cc | 6 +- icons/1downarrow.svg | 65 ++ icons/advanced.svg | 100 +++ icons/closetab-hover.svg | 213 +++++++ icons/closetab.svg | 131 ++-- icons/folder-sound.svg | 210 +++++++ icons/fulltext.svg | 704 +++++++++++++++++++++ icons/pushpin.svg | 96 +++ icons/sound-dir.svg | 210 +++++++ icons/text2speech.svg | 92 +++ icons/transliteration.svg | 113 ++++ icons/webdict.svg | 1217 +++++++++++++++++++++++++++++++++++++ icons/wizard-selected.svg | 435 +++++++++++++ mainwindow.cc | 16 +- preferences.ui | 8 +- qt-style.css | 12 +- resources.qrc | 9 + scanpopup.ui | 2 +- sources.cc | 2 +- sources.ui | 4 + website.cc | 2 +- 22 files changed, 3554 insertions(+), 95 deletions(-) create mode 100644 icons/1downarrow.svg create mode 100644 icons/advanced.svg create mode 100644 icons/closetab-hover.svg create mode 100644 icons/folder-sound.svg create mode 100644 icons/fulltext.svg create mode 100644 icons/pushpin.svg create mode 100644 icons/sound-dir.svg create mode 100644 icons/text2speech.svg create mode 100644 icons/transliteration.svg create mode 100644 icons/webdict.svg create mode 100644 icons/wizard-selected.svg diff --git a/editdictionaries.cc b/editdictionaries.cc index af9a401d..239dca5b 100644 --- a/editdictionaries.cc +++ b/editdictionaries.cc @@ -43,7 +43,7 @@ EditDictionaries::EditDictionaries( QWidget * parent, Config::Class & cfg_, ui.tabs->clear(); - ui.tabs->addTab( &sources, QIcon(":/icons/folders.svg"), tr( "&Sources" ) ); + ui.tabs->addTab( &sources, QIcon(":/icons/reload.svg"), tr( "&Sources" ) ); ui.tabs->addTab( orderAndProps.get(), QIcon(":/icons/book.svg"), tr( "&Dictionaries" ) ); ui.tabs->addTab( groups.get(), QIcon(":/icons/bookcase.svg"), tr( "&Groups" ) ); diff --git a/helpwindow.cc b/helpwindow.cc index beec1ea2..9652fb7f 100644 --- a/helpwindow.cc +++ b/helpwindow.cc @@ -77,11 +77,11 @@ HelpWindow::HelpWindow( QWidget * parent, Config::Class & cfg_ ) : navToolBar->addSeparator(); - zoomInAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoomin.png" ), tr( "Zoom In" ) ); + zoomInAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoomin.svg" ), tr( "Zoom In" ) ); navToolBar->widgetForAction( zoomInAction )->setObjectName( "zoomInButton" ); - zoomOutAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoomout.png" ), tr( "Zoom Out" ) ); + zoomOutAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoomout.svg" ), tr( "Zoom Out" ) ); navToolBar->widgetForAction( zoomInAction )->setObjectName( "zoomOutButton" ); - zoomBaseAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Normal Size" ) ); + zoomBaseAction = navToolBar->addAction( QIcon( ":/icons/icon32_zoombase.svg" ), tr( "Normal Size" ) ); navToolBar->widgetForAction( zoomBaseAction )->setObjectName( "zoomBaseButton" ); navForward->setEnabled( false ); diff --git a/icons/1downarrow.svg b/icons/1downarrow.svg new file mode 100644 index 00000000..da84dac0 --- /dev/null +++ b/icons/1downarrow.svg @@ -0,0 +1,65 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/icons/advanced.svg b/icons/advanced.svg new file mode 100644 index 00000000..7aca1999 --- /dev/null +++ b/icons/advanced.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Lapo Calamandrei + + + System Run + + + + run + launch + exec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/closetab-hover.svg b/icons/closetab-hover.svg new file mode 100644 index 00000000..df16c628 --- /dev/null +++ b/icons/closetab-hover.svg @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Stop Process + December 2006 + + + Jakub Steiner + + + + + Andreas Nilsson + + + + + + stop + halt + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/closetab.svg b/icons/closetab.svg index df16c628..4d4d088c 100644 --- a/icons/closetab.svg +++ b/icons/closetab.svg @@ -1,39 +1,40 @@ + + version="1.0" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - + + + + - - - - - @@ -91,6 +69,17 @@ offset="1" style="stop-color:#c00;stop-opacity:1;" /> + + height="48px" + inkscape:pagecheckerboard="0" + inkscape:window-maximized="1" /> @@ -122,7 +113,6 @@ image/svg+xml - Stop Process December 2006 @@ -169,45 +159,30 @@ id="g7001" transform="matrix(1.4566048,0,0,1.4455352,0.4112881,1.2324709)"> - - + sodipodi:type="arc" + sodipodi:ry="9.25" + sodipodi:rx="9.25" + sodipodi:cy="9.625" + sodipodi:cx="10" /> + d="m 11.045351,10.499838 10.29792,10.438794" + style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#f0464d;stroke-width:2.07362;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none" /> + diff --git a/icons/folder-sound.svg b/icons/folder-sound.svg new file mode 100644 index 00000000..e68af0e3 --- /dev/null +++ b/icons/folder-sound.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/fulltext.svg b/icons/fulltext.svg new file mode 100644 index 00000000..8c0ded33 --- /dev/null +++ b/icons/fulltext.svg @@ -0,0 +1,704 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/pushpin.svg b/icons/pushpin.svg new file mode 100644 index 00000000..b9a25f81 --- /dev/null +++ b/icons/pushpin.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + Pushpin 2 + 2010-03-23T19:37:10 + I noticed that I couldn't find any good pushpins when I needed one for a project, so I made one. \n \nThis is an updated version of my pushpin. I noticed that the old one didn't have enough contrast to look enough like a push pin when it was made small. I also increased the angle of the pushpin. + http://openclipart.org/detail/33601/thumbtack/pushpin-2-by-randoogle + + + randoogle + + + + + clip art + clipart + image + media + office + pin + png + public domain + pushpin + red + svg + tack + thumbtack + + + + + + + + + + + diff --git a/icons/sound-dir.svg b/icons/sound-dir.svg new file mode 100644 index 00000000..e68af0e3 --- /dev/null +++ b/icons/sound-dir.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/text2speech.svg b/icons/text2speech.svg new file mode 100644 index 00000000..7df08652 --- /dev/null +++ b/icons/text2speech.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/transliteration.svg b/icons/transliteration.svg new file mode 100644 index 00000000..03939b47 --- /dev/null +++ b/icons/transliteration.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/webdict.svg b/icons/webdict.svg new file mode 100644 index 00000000..7288a5b7 --- /dev/null +++ b/icons/webdict.svg @@ -0,0 +1,1217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Jakub Steiner + + + http://jimmac.musichall.cz + + Web Browser + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/wizard-selected.svg b/icons/wizard-selected.svg new file mode 100644 index 00000000..f5e40e91 --- /dev/null +++ b/icons/wizard-selected.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mainwindow.cc b/mainwindow.cc index 0058e042..dbfef2fb 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -234,17 +234,17 @@ MainWindow::MainWindow( Config::Class & cfg_ ): // named separator (to be able to hide it via CSS) navToolbar->widgetForAction( navToolbar->addSeparator() )->setObjectName( "separatorBeforeZoom" ); - zoomIn = navToolbar->addAction( QIcon( ":/icons/icon32_zoomin.png" ), tr( "Zoom In" ) ); + zoomIn = navToolbar->addAction( QIcon( ":/icons/icon32_zoomin.svg" ), tr( "Zoom In" ) ); zoomIn->setShortcuts( QList< QKeySequence >() << QKeySequence::ZoomIn << QKeySequence( "Ctrl+=" ) ); navToolbar->widgetForAction( zoomIn )->setObjectName( "zoomInButton" ); - zoomOut = navToolbar->addAction( QIcon( ":/icons/icon32_zoomout.png" ), tr( "Zoom Out" ) ); + zoomOut = navToolbar->addAction( QIcon( ":/icons/icon32_zoomout.svg" ), tr( "Zoom Out" ) ); zoomOut->setShortcut( QKeySequence::ZoomOut ); navToolbar->widgetForAction( zoomOut )->setObjectName( "zoomOutButton" ); - zoomBase = navToolbar->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Normal Size" ) ); + zoomBase = navToolbar->addAction( QIcon( ":/icons/icon32_zoombase.svg" ), tr( "Normal Size" ) ); zoomBase->setShortcut( QKeySequence( "Ctrl+0" ) ); navToolbar->widgetForAction( zoomBase )->setObjectName( "zoomBaseButton" ); @@ -365,13 +365,13 @@ MainWindow::MainWindow( Config::Class & cfg_ ): ui.menuZoom->addSeparator(); - wordsZoomIn = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoomin.png" ), tr( "Words Zoom In" ) ); + wordsZoomIn = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoomin.svg" ), tr( "Words Zoom In" ) ); wordsZoomIn->setShortcuts( QList< QKeySequence >() << QKeySequence( "Alt++" ) << QKeySequence( "Alt+=" ) ); - wordsZoomOut = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoomout.png" ), tr( "Words Zoom Out" ) ); + wordsZoomOut = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoomout.svg" ), tr( "Words Zoom Out" ) ); wordsZoomOut->setShortcut( QKeySequence( "Alt+-" ) ); - wordsZoomBase = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoombase.png" ), tr( "Words Normal Size" ) ); + wordsZoomBase = ui.menuZoom->addAction( QIcon( ":/icons/icon32_zoombase.svg" ), tr( "Words Normal Size" ) ); wordsZoomBase->setShortcut( QKeySequence( "Alt+0" ) ); connect( wordsZoomIn, SIGNAL(triggered()), this, SLOT(doWordsZoomIn()) ); @@ -3228,9 +3228,13 @@ void MainWindow::scanEnableToggled( bool on ) mainStatusBar->showMessage( tr( "Accessibility API is not enabled" ), 10000, QPixmap( ":/icons/error.png" ) ); #endif + enableScanPopup->setIcon(QIcon(":/icons/wizard-selected.svg")); } else + { scanPopup->disableScanning(); + enableScanPopup->setIcon(QIcon(":/icons/wizard.svg")); + } } updateTrayIcon(); diff --git a/preferences.ui b/preferences.ui index c063c532..54ff1fc2 100644 --- a/preferences.ui +++ b/preferences.ui @@ -865,7 +865,7 @@ p, li { white-space: pre-wrap; } - :/icons/playsound_color.svg:/icons/playsound_color.svg + :/icons/text2speech.svg:/icons/text2speech.svg &Audio @@ -1253,7 +1253,7 @@ download page. - :/icons/system-search.svg:/icons/system-search.svg + :/icons/fulltext.svg:/icons/fulltext.svg Full-text search @@ -1428,6 +1428,10 @@ download page. + + + :/icons/advanced.svg:/icons/advanced.svg + Ad&vanced diff --git a/qt-style.css b/qt-style.css index ea1120b6..353857b0 100644 --- a/qt-style.css +++ b/qt-style.css @@ -54,7 +54,7 @@ ScanPopup #translateLine[noResults="true"] } #navToolbar GroupComboBox::down-arrow { - image: url(:/icons/1downarrow.png); + image: url(:/icons/1downarrow.svg); } #navToolbar GroupComboBox::down-arrow:on { /* shift the arrow when popup is open */ @@ -62,6 +62,14 @@ ScanPopup #translateLine[noResults="true"] left: 1px; } +QTabBar::close-button { + image: url(:/icons/closetab.svg) +} +QTabBar::close-button:hover { + image: url(:/icons/closetab-hover.svg) +} + + ArticleView #searchText[noResults="true"] { background: #febb7d; @@ -125,7 +133,7 @@ ScanPopup GroupComboBox::drop-down { } ScanPopup GroupComboBox::down-arrow { - image: url(:/icons/1downarrow.png); + image: url(:/icons/1downarrow.svg); } ScanPopup GroupComboBox::down-arrow:on { /* shift the arrow when popup is open */ diff --git a/resources.qrc b/resources.qrc index 97f77dd6..fea0883e 100644 --- a/resources.qrc +++ b/resources.qrc @@ -120,5 +120,14 @@ icons/windows-list.svg icons/wizard.svg icons/dictionary.svg + icons/advanced.svg + icons/webdict.svg + icons/transliteration.svg + icons/pushpin.svg + icons/fulltext.svg + icons/text2speech.svg + icons/closetab-hover.svg + icons/1downarrow.svg + icons/wizard-selected.svg diff --git a/scanpopup.ui b/scanpopup.ui index e47fdd69..cce78cd3 100644 --- a/scanpopup.ui +++ b/scanpopup.ui @@ -256,7 +256,7 @@ could be resized or managed in other ways. - :/icons/pushpin.png:/icons/pushpin.png + :/icons/pushpin.svg:/icons/pushpin.svg true diff --git a/sources.cc b/sources.cc index fec30ef0..60558408 100644 --- a/sources.cc +++ b/sources.cc @@ -121,7 +121,7 @@ Sources::Sources( QWidget * parent, Config::Class const & cfg): // Text to speech #if defined( Q_OS_WIN32 ) || defined( Q_OS_MAC ) textToSpeechSource = new TextToSpeechSource( this, cfg.voiceEngines ); - ui.tabWidget->addTab( textToSpeechSource, QIcon(":/icons/playsound_color.svg"), tr( "Text to Speech" ) ); + ui.tabWidget->addTab( textToSpeechSource, QIcon(":/icons/text2speech.svg"), tr( "Text to Speech" ) ); #endif if ( Config::isPortableVersion() ) diff --git a/sources.ui b/sources.ui index 307cd02d..21ddd1ce 100644 --- a/sources.ui +++ b/sources.ui @@ -630,6 +630,10 @@ in the future, or register on the site to get your own key. + + + :/icons/transliteration.svg:/icons/transliteration.svg + Transliteration diff --git a/website.cc b/website.cc index 942aedb6..ecc7912e 100644 --- a/website.cc +++ b/website.cc @@ -528,7 +528,7 @@ void WebSiteDictionary::loadIcon() throw() loadIconFromFile( fInfo.absoluteFilePath(), true ); } if( dictionaryIcon.isNull() ) - dictionaryIcon = dictionaryNativeIcon = QIcon(":/icons/internet.svg"); + dictionaryIcon = dictionaryNativeIcon = QIcon(":/icons/webdict.svg"); dictionaryIconLoaded = true; } From 7738d3535007f5c2f309bbca2a361a5eb450a79b Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Tue, 25 Jan 2022 23:38:14 +0800 Subject: [PATCH 4/4] high dpi: translateLine icon fixed. --- extlineedit.cc | 10 +++++-- icons/1downarrow.svg | 66 +++++++++++++++++++++++++++++--------------- translatebox.cc | 5 ++-- 3 files changed, 53 insertions(+), 28 deletions(-) diff --git a/extlineedit.cc b/extlineedit.cc index 36bb783b..ecaa7bda 100644 --- a/extlineedit.cc +++ b/extlineedit.cc @@ -92,8 +92,9 @@ void ExtLineEdit::updateMargins() Side realLeft = (leftToRight ? Left : Right); Side realRight = (leftToRight ? Right : Left); - int leftMargin = iconButtons[realLeft]->pixmap().width() + 8; - int rightMargin = iconButtons[realRight]->pixmap().width() + 8; + int widgetHeight=height(); + int leftMargin = widgetHeight + 8; + int rightMargin = widgetHeight + 8; setTextMargins( (iconEnabled[realLeft] ? leftMargin : 0), 1, @@ -162,7 +163,10 @@ void IconButton::paintEvent(QPaintEvent *) { QPainter painter(this); painter.setRenderHint(QPainter::RenderHint::Antialiasing); - QRect pixmapRect = QRect(0, 0, m_pixmap.width(), m_pixmap.height()); + painter.setRenderHint(QPainter::RenderHint::TextAntialiasing); + painter.setRenderHint(QPainter::RenderHint::SmoothPixmapTransform); + painter.setRenderHint(QPainter::RenderHint::LosslessImageRendering); + QRect pixmapRect = QRect(0, 0, height(), height()); pixmapRect.moveCenter(rect().center()); if (m_autohide) diff --git a/icons/1downarrow.svg b/icons/1downarrow.svg index da84dac0..fcd98ffd 100644 --- a/icons/1downarrow.svg +++ b/icons/1downarrow.svg @@ -2,24 +2,43 @@ + inkscape:export-ydpi="90" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + id="defs4"> + + + + + + inkscape:window-width="1402" + inkscape:window-height="1040" + inkscape:window-x="26" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:pagecheckerboard="0" /> @@ -46,18 +66,18 @@ image/svg+xml - + + transform="translate(0,-540.3622)" + style="display:inline"> diff --git a/translatebox.cc b/translatebox.cc index 83b1fc82..67944754 100644 --- a/translatebox.cc +++ b/translatebox.cc @@ -111,12 +111,13 @@ TranslateBox::TranslateBox(QWidget *parent) : QWidget(parent), layout->addWidget(translate_line); QPixmap image(":/icons/system-search.svg"); - translate_line->setButtonPixmap(ExtLineEdit::Left, image.scaled(18, 18, Qt::KeepAspectRatio, Qt::SmoothTransformation)); + + translate_line->setButtonPixmap(ExtLineEdit::Left, image); // translate_line->setButtonToolTip(ExtLineEdit::Left, tr("Options")); translate_line->setButtonVisible(ExtLineEdit::Left, true); translate_line->setButtonFocusPolicy(ExtLineEdit::Left, Qt::ClickFocus); - QPixmap right(":/icons/1downarrow.png"); + QPixmap right(":/icons/1downarrow.svg"); translate_line->setButtonPixmap(ExtLineEdit::Right, right); translate_line->setButtonToolTip(ExtLineEdit::Right, tr("Drop-down")); translate_line->setButtonVisible(ExtLineEdit::Right, true);