Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 773e8675 authored by Thomas Eschenbacher's avatar Thomas Eschenbacher

some more icon handling tuning, to improve appearance on High DPI displays

parent a8dfcdeb
......@@ -211,7 +211,6 @@ COMPLETE LIST OF FILES AND THEIR LICENSE
kwave/pics/knob.xpm LGPL2 (crystal project) [derived from greenled.png]
kwave/pics/kwave-splash.png (should be GPL2+ / Thomas Eschenbacher)
kwave/pics/kwave.svgz (should be GPL2+ / Thomas Eschenbacher)
kwave/pics/krec_record.xpm LGPL2 (crystal project) [converted from mix_record.png]
kwave/pics/light_off.xpm LGPL2 (crystal project) [derived from greenled.png]
kwave/pics/light_on.xpm LGPL2 (crystal project) [copied from greenled.png]
kwave/pics/logo.xpm (should be GPL2+ / Martin Wilz)
......@@ -758,7 +757,6 @@ COMPLETE LIST OF FILES AND THEIR LICENSE
plugins/playback/PlayBackPlugin.h GPL2+
plugins/record/CMakeLists.txt BSD (3 clause)
plugins/record/krec_record.xpm LGPL2 (crystal project) [converted from mix_record.png]
plugins/record/kwaveplugin_record.desktop.in GPL2+
plugins/record/LevelMeter.cpp GPL2+ / Rik Hemsley
plugins/record/LevelMeter.h GPL2+ / Rik Hemsley
......@@ -779,13 +777,10 @@ COMPLETE LIST OF FILES AND THEIR LICENSE
plugins/record/RecordingState.xmi (should be GPL2+)
plugins/record/RecordParams.cpp GPL2+
plugins/record/RecordParams.h GPL2+
plugins/record/record_pause2.xpm (should be GPL2+)
plugins/record/record_pause.xpm (should be GPL2+)
plugins/record/RecordPlugin.cpp GPL2+
plugins/record/RecordPlugin.h GPL2+
plugins/record/RecordPlugin.png (should be GPL2+)
plugins/record/RecordState.h GPL2+
plugins/record/record_stop.xpm (should be GPL2+)
plugins/record/RecordThread.cpp GPL2+
plugins/record/RecordThread.h GPL2+
plugins/record/RecordTypesMap.cpp GPL2+
......
......@@ -52,10 +52,10 @@ SET(kwave_PIXMAPS
pics/logo.xpm
pics/noise.png
pics/selectedknob.xpm
pics/sound_device.png
pics/sound_subdevice.png
pics/sound_card.png
pics/sound_device.png
pics/sound_note.png
pics/sound_subdevice.png
)
#############################################################################
......
......@@ -18,11 +18,11 @@
#include "config.h"
#include <QAction>
#include <QtGlobal>
#include <QAction>
#include <QIcon>
#include <KLocalizedString>
#include <KIconLoader>
#include <KMainWindow>
#include "libkwave/FileInfo.h"
......@@ -70,60 +70,48 @@ Kwave::PlayerToolBar::PlayerToolBar(KMainWindow *parent, const QString &name,
m_last_visible(0),
m_last_length(0)
{
KIconLoader icon_loader;
const int max_s = KIconLoader::SizeEnormous;
m_action_prev = addAction(
icon_loader.loadIcon(_("kwave_player_start"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_start")),
i18n("Previous"),
this, SLOT(toolbarRewindPrev()));
m_action_rewind = addAction(
icon_loader.loadIcon(_("kwave_player_rew"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_rew")),
i18n("Rewind"),
this, SLOT(toolbarRewind()));
m_action_record = addAction(
icon_loader.loadIcon(_("kwave_player_record"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_record")),
i18n("Record"),
this, SLOT(toolbarRecord()));
m_action_play = addAction(
icon_loader.loadIcon(_("kwave_player_play"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_play")),
i18n("Start playback"),
this, SLOT(toolbarStart()));
m_action_loop = addAction(
icon_loader.loadIcon(_("kwave_player_loop"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_loop")),
i18n("Start playback and loop"),
this, SLOT(toolbarLoop()));
m_action_pause = addAction(
icon_loader.loadIcon(_("kwave_player_pause"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_pause")),
QString(),
this, SLOT(toolbarPause()));
m_action_stop = addAction(
icon_loader.loadIcon(_("kwave_player_stop"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_stop")),
i18n("Stop playback or loop"),
this, SLOT(toolbarStop()));
m_action_forward = addAction(
icon_loader.loadIcon(_("kwave_player_fwd"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_fwd")),
i18n("Forward"),
this, SLOT(toolbarForward()));
m_action_next = addAction(
icon_loader.loadIcon(_("kwave_player_end"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_player_end")),
i18n("Next"),
this, SLOT(toolbarForwardNext()));
......@@ -316,18 +304,13 @@ void Kwave::PlayerToolBar::toolbarStop()
//***************************************************************************
void Kwave::PlayerToolBar::blinkPause()
{
KIconLoader icon_loader;
const int max_s = KIconLoader::SizeEnormous;
const bool paused = m_playback && m_playback->paused();
Q_ASSERT(m_action_pause);
if (!m_action_pause) return;
m_action_pause->setIcon(icon_loader.loadIcon(
_((paused && m_blink_on) ?
"kwave_player_pause_2" : "kwave_player_pause"),
KIconLoader::Toolbar, max_s)
);
m_action_pause->setIcon(QIcon::fromTheme(_((paused && m_blink_on) ?
"kwave_player_pause_2" : "kwave_player_pause")));
m_blink_on = !m_blink_on;
}
......
......@@ -50,12 +50,10 @@
#include <KConfig>
#include <KConfigGroup>
#include <KHelpMenu>
#include <KIconLoader>
#include <KLocalizedString>
#include <KMessageBox>
#include <KToolBar>
#include <KSharedConfig>
#include <KToolBar>
#include "libkwave/ClipBoard.h"
#include "libkwave/CodecManager.h"
......@@ -268,8 +266,6 @@ Kwave::FileContext *Kwave::TopWidget::currentContext() const
//***************************************************************************
bool Kwave::TopWidget::init()
{
KIconLoader icon_loader;
showInSplashSreen(i18n("Loading main menu..."));
QMenuBar *menubar = menuBar();
Q_ASSERT(menubar);
......@@ -351,27 +347,27 @@ bool Kwave::TopWidget::init()
// --- file open and save ---
toolbar_file->addAction(
icon_loader.loadIcon(_("document-new"), KIconLoader::Toolbar),
QIcon::fromTheme(_("document-new")),
i18n("Create a new empty file"),
this, SLOT(toolbarFileNew()));
toolbar_file->addAction(
icon_loader.loadIcon(_("document-open"), KIconLoader::Toolbar),
QIcon::fromTheme(_("document-open")),
i18n("Open an existing file"),
this, SLOT(toolbarFileOpen()));
m_action_save = toolbar_file->addAction(
icon_loader.loadIcon(_("document-save"), KIconLoader::Toolbar),
QIcon::fromTheme(_("document-save")),
i18n("Save the current file"),
this, SLOT(toolbarFileSave()));
m_action_save_as = toolbar_file->addAction(
icon_loader.loadIcon(_("document-save-as"), KIconLoader::Toolbar),
QIcon::fromTheme(_("document-save-as")),
i18n("Save the current file under a different name or file format..."),
this, SLOT(toolbarFileSaveAs()));
m_action_close = toolbar_file->addAction(
icon_loader.loadIcon(_("document-close"), KIconLoader::Toolbar),
QIcon::fromTheme(_("document-close")),
i18n("Close the current file"),
this, SLOT(toolbarFileClose()));
......@@ -382,27 +378,27 @@ bool Kwave::TopWidget::init()
if (!toolbar_edit) return false;
m_action_undo = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-undo"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-undo")),
i18n("Undo"),
this, SLOT(toolbarEditUndo()));
m_action_redo = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-redo"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-redo")),
i18n("Redo"),
this, SLOT(toolbarEditRedo()));
m_action_cut = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-cut"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-cut")),
i18n("Cut"),
this, SLOT(toolbarEditCut()));
m_action_copy = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-copy"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-copy")),
i18n("Copy"),
this, SLOT(toolbarEditCopy()));
QAction *btPaste = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-paste"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-paste")),
i18n("Insert"),
this, SLOT(toolbarEditPaste()));
btPaste->setEnabled(!Kwave::ClipBoard::instance().isEmpty());
......@@ -410,12 +406,12 @@ bool Kwave::TopWidget::init()
btPaste, SLOT(setEnabled(bool)));
m_action_erase = toolbar_edit->addAction(
icon_loader.loadIcon(_("draw-eraser"), KIconLoader::Toolbar),
QIcon::fromTheme(_("draw-eraser")),
i18n("Mute selection"),
this, SLOT(toolbarEditErase()));
m_action_delete = toolbar_edit->addAction(
icon_loader.loadIcon(_("edit-delete"), KIconLoader::Toolbar),
QIcon::fromTheme(_("edit-delete")),
i18n("Delete selection"),
this, SLOT(toolbarEditDelete()));
......
......@@ -21,10 +21,10 @@
#include <math.h>
#include <QAction>
#include <QIcon>
#include <KComboBox>
#include <KLocalizedString>
#include <KIconLoader>
#include <KMainWindow>
#include "libkwave/Selection.h"
......@@ -58,36 +58,28 @@ Kwave::ZoomToolBar::ZoomToolBar(KMainWindow *parent, const QString &name)
m_action_zoomselect(Q_NULLPTR),
m_zoomselect(Q_NULLPTR)
{
KIconLoader icon_loader;
const int max_s = KIconLoader::SizeEnormous;
m_action_zoomselection = addAction(
icon_loader.loadIcon(_("kwave_viewmag"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_viewmag")),
i18n("Zoom to selection"),
this, SLOT(zoomSelection()));
m_action_zoomin = addAction(
icon_loader.loadIcon(_("kwave_zoom_in"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_zoom_in")),
i18n("Zoom in"),
this, SLOT(zoomIn()));
m_action_zoomout = addAction(
icon_loader.loadIcon(_("kwave_zoom_out"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_zoom_out")),
i18n("Zoom out"),
this, SLOT(zoomOut()));
m_action_zoomnormal = addAction(
icon_loader.loadIcon(_("kwave_zoom_original"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_zoom_original")),
i18n("Zoom to 100%"),
this, SLOT(zoomNormal()));
m_action_zoomall = addAction(
icon_loader.loadIcon(_("kwave_viewmagfit"),
KIconLoader::Toolbar, max_s),
QIcon::fromTheme(_("kwave_viewmagfit")),
i18n("Zoom to all"),
this, SLOT(zoomAll()));
......
......@@ -23,7 +23,7 @@
menu (ignore(),File/Open Recent/#icon(document-open-recent))
menu (ignore(),File/Open Recent/-/#hidden) # workaround to protect the separator
menu (ignore(),File/Open Recent/#separator)
menu (openrecent:clear(),File/Open Recent/Clear List,,ID_FILE_OPEN_RECENT_CLEAR)
menu (openrecent:clear(),File/Open Recent/Clear List/#icon(edit-clear-list),,ID_FILE_OPEN_RECENT_CLEAR)
menu (ignore(),File/#separator)
menu (plugin:setup(record),File/Record/#icon(media-record),F2,ID_RECORD)
......@@ -64,7 +64,7 @@
menu (copy(),Edit/Copy/#group(@SIGNAL,@SELECTION))
menu (paste(),Edit/Paste/#icon(edit-paste),::Paste)
menu (paste(),Edit/Paste/#group(@SIGNAL,@CLIPBOARD))
menu (crop(),Edit/Crop/#icon(crop),SHIFT+::Cut)
menu (crop(),Edit/Crop/#icon(transform-crop),SHIFT+::Cut)
menu (crop(),Edit/Crop/#group(@SIGNAL,@SELECTION))
menu (delete(),Edit/Delete/#icon(edit-delete),::Delete)
menu (delete(),Edit/Delete/#group(@SIGNAL,@SELECTION))
......@@ -140,8 +140,8 @@ menu (ignore(),Play/#group(@SIGNAL),,ID_PLAY_MENU)
menu (playback(next),Play/Next/#icon(kwave_player_end),::MoveToNextPage,ID_PLAYBACK_NEXT)
menu (ignore(),Record)
menu (plugin:setup(record),Record/Prepare...)
menu (plugin:setup(record,start_now),Record/Start Now!)
menu (plugin:setup(record),Record/Prepare.../#icon(configure))
menu (plugin:setup(record,start_now),Record/Start Now!/#icon(media-record))
menu (ignore(),Labels/#group(@SIGNAL),,ID_LABELS)
menu (label:add(),Labels/Add.../#icon(list-add))
......@@ -242,8 +242,8 @@ menu (ignore(),Settings)
menu (plugin:setup(playback),Settings/Playback/#icon(speaker))
menu (ignore(),Settings/Record)
menu (plugin:setup(record,format), Settings/Record/Format)
menu (plugin:setup(record,source), Settings/Record/Source)
menu (plugin:setup(record,format), Settings/Record/Format/#icon(configure))
menu (plugin:setup(record,source), Settings/Record/Source/#icon(audio-input-microphone))
menu (plugin:setup(memory),Settings/Memory/#icon(configure))
menu (reset_toolbars(),Settings/Reset Toolbar/#icon(configure-toolbars))
......
/* XPM */
static const char *xpm_krec_record[] = {
/* columns rows colors chars-per-pixel */
"22 22 223 2",
" c #9D0000",
". c #A00000",
"X c #A20000",
"o c #A40000",
"O c #AD0000",
"+ c #AF0000",
"@ c #B10000",
"# c #B20000",
"$ c #BF0000",
"% c #B71414",
"& c #C10000",
"* c #D60000",
"= c #DD0505",
"- c #D01212",
"; c #E10000",
": c #E40000",
"> c #E60000",
", c #E40202",
"< c #E90000",
"1 c #EA0000",
"2 c #E80303",
"3 c #EC0000",
"4 c #EF0101",
"5 c #ED0707",
"6 c #EE0E0E",
"7 c #F40000",
"8 c #F50000",
"9 c #F70000",
"0 c #F50505",
"q c #F90000",
"w c #FA0000",
"e c #FC0101",
"r c #FD0101",
"t c #FE0303",
"y c #FE0505",
"u c #F00E0E",
"i c #FF0909",
"p c #FF0A0A",
"a c #FF0D0D",
"s c #E01B1B",
"d c #E21B1B",
"f c #FF1010",
"g c #FF1313",
"h c #FA1616",
"j c #FD1414",
"k c #FF1616",
"l c #FF1818",
"z c #FF1919",
"x c #FF1C1C",
"c c #FF1D1D",
"v c #FC1F1F",
"b c #C12020",
"n c #D12828",
"m c #C63A3A",
"M c #C73A3A",
"N c #F72121",
"B c #F92121",
"V c #FF2020",
"C c #FF2424",
"Z c #FF2727",
"A c #FF2828",
"S c #FF2C2C",
"D c #FF2E2E",
"F c #EB3D3D",
"G c #ED3D3D",
"H c #FE3131",
"J c #FF3232",
"K c #FE3333",
"L c #FF3434",
"P c #FF3535",
"I c #F23D3D",
"U c #F43D3D",
"Y c #FF3838",
"T c #FF3939",
"R c #FF3A3A",
"E c #F83D3D",
"W c #FA3D3D",
"Q c #FF3C3C",
"! c #FF3D3D",
"~ c #FD3E3E",
"^ c #FE3F3F",
"/ c #FF3F3F",
"( c #D64040",
") c #D74040",
"_ c #D54646",
"` c #D64646",
"' c #D24B4B",
"] c #D95C5C",
"[ c #DA5C5C",
"{ c #E74848",
"} c #E14D4D",
"| c #E34D4D",
" . c #E84848",
".. c #EC4848",
"X. c #EE4848",
"o. c #FF4141",
"O. c #FF4343",
"+. c #FF4444",
"@. c #FF4545",
"#. c #FF4747",
"$. c #F24848",
"%. c #F34848",
"&. c #F74848",
"*. c #F84848",
"=. c #FB4848",
"-. c #FC4848",
";. c #FE4949",
":. c #FF4949",
">. c #FE4A4A",
",. c #FF4B4B",
"<. c #FF4C4C",
"1. c #FF4D4D",
"2. c #FF4E4E",
"3. c #FF4F4F",
"4. c #E85252",
"5. c #E95252",
"6. c #EC5252",
"7. c #ED5252",
"8. c #E35D5D",
"9. c #E45D5D",
"0. c #E75D5D",
"q. c #E85D5D",
"w. c #EB5D5D",
"e. c #EC5D5D",
"r. c #EE5D5D",
"t. c #EF5D5D",
"y. c #F05252",
"u. c #F15252",
"i. c #F45252",
"p. c #F55252",
"a. c #F75252",
"s. c #F85252",
"d. c #FA5252",
"f. c #FB5252",
"g. c #FF5050",
"h. c #FF5151",
"j. c #FC5252",
"k. c #FD5252",
"l. c #FF5252",
"z. c #FF5353",
"x. c #FF5454",
"c. c #FF5555",
"v. c #FF5757",
"b. c #F15D5D",
"n. c #F35D5D",
"m. c #F45D5D",
"M. c #F55D5D",
"N. c #FF5858",
"B. c #FF5959",
"V. c #FF5A5A",
"C. c #FF5B5B",
"Z. c #FF5C5C",
"A. c #FF5D5D",
"S. c #FF5E5E",
"D. c #D96464",
"F. c #E36767",
"G. c #E46767",
"H. c #E66767",
"J. c #E76767",
"K. c #E96767",
"L. c #EB6767",
"P. c #EC6767",
"I. c #ED6767",
"U. c #EE6767",
"Y. c #EF6767",
"T. c #FF6161",
"R. c #FF6262",
"E. c #FF6464",
"W. c #FF6565",
"Q. c #FF6666",
"!. c #FF6868",
"~. c #FF6969",
"^. c #FF6A6A",
"/. c #FF6B6B",
"(. c #FF6E6E",
"). c #E27272",
"_. c #E37272",
"`. c #E57272",
"'. c #E67272",
"]. c #E77272",
"[. c #E87272",
"{. c #E97272",
"}. c #EA7272",
"|. c #E37C7C",
" X c #E47C7C",
".X c #E57C7C",
"XX c #FF7373",
"oX c #FF7676",
"OX c #FF7777",
"+X c #FF7878",
"@X c #FF7979",
"#X c #FF7A7A",
"$X c #FF7C7C",
"%X c #FF7D7D",
"&X c #FF8282",
"*X c #FF8383",
"=X c #FF8585",
"-X c #FF8686",
";X c #FF8888",
":X c #FF8989",
">X c #FF8A8A",
",X c #FF8C8C",
"<X c #FF8E8E",
"1X c #FF8F8F",
"2X c #FF9191",
"3X c #FF9494",
"4X c #FF9595",
"5X c #FF9898",
"6X c #FF9999",
"7X c #FF9A9A",
"8X c #FF9C9C",
"9X c #FF9F9F",
"0X c #FFA1A1",
"qX c #FFA2A2",
"wX c #FFA3A3",
"eX c #FFAFAF",
"rX c #FFB0B0",
"tX c #FFB2B2",
"yX c #FFC3C3",
"uX c #FFD2D2",
"iX c #FFD7D7",
"pX c #FFDCDC",
"aX c None",
/* pixels */
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXo % m ' D.D.' M % X aXaXaXaXaXaX",
"aXaXaXaX. b ] |. X.X.X.X.X X|.[ b aXaXaXaX",
"aXaXaX+ _ ).`.'.[.{.}.}.{.[.].`._.` O aXaXaX",
"aXaX# ( F.H.K.L.I.U.Y.Y.U.I.P.K.J.G.) @ aXaX",
"aXaXn 8.0.w.r.b.n.m.M.M.M.n.b.t.e.q.9.n aXaX",
"aX& } 4.6.y.i.a.d.f.j.k.j.d.s.p.u.7.5.| $ aX",
"aX- { ..$.&.=.;.<.3.h.h.g.1.>.-.*.%.X. .- aX",
"aXs F I E ~ O.:.3.l.x.c.z.g.,.+.^ W U G d aX",
"aX: 6 N H ! @.1.z.N.V.C.B.c.3.#./ K B u > aX",
"aX3 7 r a C T :.z.C.T.R.Z.x.,.Q Z f t 9 4 aX",
"aX1 w i z A P o.,.z.v.v.x.2.+.T S c a e 2 aX",
"aX, y g C L O.h.Z.E.~.^.Q.S.x.#.Y A l p = aX",
"aX; j x D / 3.S./.oX$X%X+X(.R.z.O.J V v * aX",
"aXaX0 D P #.B.^.@X-X<X1X:X%X(.S.<.R Q 5 aXaX",
"aXaX8 k <.l.T.XX=X3X9X0X5X:X+XW.V.A.h < aXaX",
"aXaXaXp A A.#X;X2X9XeXtXwX6X4X,X!.x q aXaXaX",
"aXaXaXaXaXR B.*XqXyXuXpXiXrX:X3.Z aXaXaXaXaX",
"aXaXaXaXaXaXaXT.OX>X8X7X&X^.3.aXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX"
};
......@@ -58,7 +58,7 @@ Kwave::CurveWidget::CurveWidget(QWidget *parent)
m_last(Kwave::Curve::NoPoint),
m_down(false), m_knob(), m_selected_knob()
{
KIconLoader icon_loader;
KIconLoader *icon_loader = KIconLoader::global();
// set the default curve
m_curve.fromCommand(_("curve(linear,0,0,1,1)"));
......@@ -68,9 +68,11 @@ Kwave::CurveWidget::CurveWidget(QWidget *parent)
setPalette(pal);
// create the pixmaps for the selected and non-selected knob
m_knob = icon_loader.loadIcon(_("knob.xpm"), KIconLoader::Small);
m_selected_knob = icon_loader.loadIcon(_("selectedknob.xpm"),
KIconLoader::Small);
if (icon_loader) {
m_knob = icon_loader->loadIcon(_("knob.xpm"), KIconLoader::Small);
m_selected_knob = icon_loader->loadIcon(_("selectedknob.xpm"),
KIconLoader::Small);
}
// set up the context menu for the right mouse button
m_menu = new QMenu(this);
......
......@@ -18,9 +18,9 @@
#include "config.h"
#include <QAction>
#include <QIcon>
#include <QMenu>
#include <KIconLoader>
#include <KLocalizedString>
#include "libkwave/Label.h"
......@@ -99,7 +99,6 @@ void Kwave::LabelItem::appendContextMenu(QMenu *parent)
// the context menu of a label has been activated
if (label_menu) {
KIconLoader icon_loader;
// find the "New" action and disable it
foreach (QAction *action, label_menu->actions()) {
......@@ -110,13 +109,13 @@ void Kwave::LabelItem::appendContextMenu(QMenu *parent)
}
QAction *action_label_delete = label_menu->addAction(
icon_loader.loadIcon(_("list-remove"), KIconLoader::Toolbar),
QIcon::fromTheme(_("list-remove")),
i18n("&Delete"), this, SLOT(contextMenuLabelDelete()));
Q_ASSERT(action_label_delete);
if (!action_label_delete) return;
QAction *action_label_properties = label_menu->addAction(
icon_loader.loadIcon(_("configure"), KIconLoader::Toolbar),
QIcon::fromTheme(_("configure")),
i18n("&Properties..."), this, SLOT(contextMenuLabelProperties()));
Q_ASSERT(action_label_properties);
if (!action_label_properties) return;
......
......@@ -21,7 +21,6 @@
#include <QPixmap>
#include <KLocalizedString>
#include <KIconLoader>
#include "libkwave/Parser.h"
#include "libkwave/String.h"
......
......@@ -22,8 +22,6 @@
#include <QLatin1Char>
#include <QPixmap>
#include <KIconLoader>
#include "libkwave/Parser.h"
#include "libkwave/String.h"
......@@ -426,19 +424,15 @@ bool Kwave::MenuNode::specialCommand(const QString &command)
if (parser.command() == _("#icon")) {
// --- give the item an icon ---
const QString &filename = parser.firstParam();
if (filename.length()) {
const QString &icon_name = parser.firstParam();
if ( icon_name.length()) {
// try to load from standard dirs
KIconLoader loader;
QIcon icon = loader.loadIcon(filename,
KIconLoader::Small, 0, KIconLoader::DefaultState,
QStringList(), Q_NULLPTR, true);
QIcon icon = QIcon::fromTheme( icon_name );
if (!icon.isNull()) {
setIcon(icon);
} else {
qWarning("MenuNode '%s': icon '%s' not found !",
DBG(name()), DBG(filename));
DBG(name()), DBG( icon_name ));
}
}
return true;
......
......@@ -29,6 +29,7 @@
#include <QDropEvent>
#include <QEvent>
#include <QFrame>
#include <QIcon>
#include <QMenu>