diff --git a/debuggerui.qrc b/debuggerui.qrc new file mode 100644 index 00000000..3ab46ef4 --- /dev/null +++ b/debuggerui.qrc @@ -0,0 +1,18 @@ + + + icons/run.svg + icons/cancel.svg + icons/connect.svg + icons/disconnect.svg + icons/pause.svg + icons/restart.svg + icons/resume.svg + icons/stepinto.svg + icons/stepout.svg + icons/stepover.svg + icons/stop.svg + icons/debugger.svg + icons/breakpoint.svg + icons/menu.png + + diff --git a/icons/menu.png b/icons/menu.png new file mode 100644 index 00000000..0c1c69a1 Binary files /dev/null and b/icons/menu.png differ diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 0b8335fe..17eb71ae 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt6 COMPONENTS Core Gui Widgets REQUIRED) -file(GLOB SOURCES *.cpp *.h) +file(GLOB SOURCES *.cpp *.h ../debuggerui.qrc) list(FILTER SOURCES EXCLUDE REGEX moc_.*) list(FILTER SOURCES EXCLUDE REGEX qrc_.*) diff --git a/ui/controlswidget.cpp b/ui/controlswidget.cpp index 046db58b..eefdbcf7 100644 --- a/ui/controlswidget.cpp +++ b/ui/controlswidget.cpp @@ -39,13 +39,13 @@ DebugControlsWidget::DebugControlsWidget(QWidget* parent, const std::string name auto red = getThemeColor(RedStandardHighlightColor); auto white = getThemeColor(WhiteStandardHighlightColor); - m_actionRun = addAction(getColoredIcon(":/icons/images/debugger/run.svg", red), "Run", + m_actionRun = addAction(getColoredIcon(":/debugger_icons/icons/run.svg", red), "Run", [this](){ performLaunch(); }); - m_actionPause = addAction(getColoredIcon(":/icons/images/debugger/pause.svg", white), "Pause", + m_actionPause = addAction(getColoredIcon(":/debugger_icons/icons/pause.svg", white), "Pause", [this](){ performPause(); }); - m_actionResume = addAction(getColoredIcon(":/icons/images/debugger/resume.svg", green), "Resume", + m_actionResume = addAction(getColoredIcon(":/debugger_icons/icons/resume.svg", green), "Resume", [this](){ performResume(); }); // m_actionRun->setVisible(true); @@ -53,23 +53,23 @@ DebugControlsWidget::DebugControlsWidget(QWidget* parent, const std::string name m_actionResume->setVisible(false); // TODO: we need a different icon here - m_actionAttachPid = addAction(getColoredIcon(":/icons/images/debugger/connect.svg", white), "Attach to PID", + m_actionAttachPid = addAction(getColoredIcon(":/debugger_icons/icons/connect.svg", white), "Attach to PID", [this](){ performAttachPID(); }); - m_actionDetach = addAction(getColoredIcon(":/icons/images/debugger/disconnect.svg", red), "Detach", + m_actionDetach = addAction(getColoredIcon(":/debugger_icons/icons/disconnect.svg", red), "Detach", [this](){ performDetach(); }); m_actionDetach->setVisible(false); - m_actionRestart = addAction(getColoredIcon(":/icons/images/debugger/restart.svg", red), "Restart", + m_actionRestart = addAction(getColoredIcon(":/debugger_icons/icons/restart.svg", red), "Restart", [this](){ performRestart(); }); - m_actionQuit = addAction(getColoredIcon(":/icons/images/debugger/cancel.svg", red), "Quit", + m_actionQuit = addAction(getColoredIcon(":/debugger_icons/icons/cancel.svg", red), "Quit", [this](){ performQuit(); }); addSeparator(); - m_actionStepInto = addAction(getColoredIcon(":/icons/images/debugger/stepinto.svg", cyan), "Step Into", + m_actionStepInto = addAction(getColoredIcon(":/debugger_icons/icons/stepinto.svg", cyan), "Step Into", [this](){ performStepInto(); }); - m_actionStepOver = addAction(getColoredIcon(":/icons/images/debugger/stepover.svg", cyan), "Step Over", + m_actionStepOver = addAction(getColoredIcon(":/debugger_icons/icons/stepover.svg", cyan), "Step Over", [this](){ performStepOver(); }); - m_actionStepReturn = addAction(getColoredIcon(":/icons/images/debugger/stepout.svg", cyan), "Step Out", + m_actionStepReturn = addAction(getColoredIcon(":/debugger_icons/icons/stepout.svg", cyan), "Step Out", [this](){ performStepReturn(); }); updateButtons(); diff --git a/ui/moduleswidget.cpp b/ui/moduleswidget.cpp index 6edaa678..312a0544 100644 --- a/ui/moduleswidget.cpp +++ b/ui/moduleswidget.cpp @@ -584,7 +584,7 @@ DebugModulesWithFilter::DebugModulesWithFilter(ViewFrame* view, BinaryViewRef da headerLayout->setContentsMargins(0, 0, 0, 0); headerLayout->addWidget(m_separateEdit, 1); - auto* icon = new ClickableIcon(QImage(":/icons/images/menu.png"), QSize(16, 16)); + auto* icon = new ClickableIcon(QImage(":/debugger_icons/icons/menu.png"), QSize(16, 16)); connect(icon, &ClickableIcon::clicked, m_modules, &DebugModulesWidget::showContextMenu); headerLayout->addWidget(icon); diff --git a/ui/registerswidget.cpp b/ui/registerswidget.cpp index 21286df0..61d22188 100644 --- a/ui/registerswidget.cpp +++ b/ui/registerswidget.cpp @@ -726,7 +726,7 @@ DebugRegistersContainer::DebugRegistersContainer(ViewFrame* view, BinaryViewRef headerLayout->setContentsMargins(1, 1, 6, 0); headerLayout->setAlignment(Qt::AlignBaseline); - ClickableIcon* icon = new ClickableIcon(QImage(":/icons/images/menu.png"), QSize(16, 16)); + ClickableIcon* icon = new ClickableIcon(QImage(":/debugger_icons/icons/menu.png"), QSize(16, 16)); connect(icon, &ClickableIcon::clicked, m_register, &DebugRegistersWidget::showContextMenu); headerLayout->addWidget(icon); diff --git a/ui/ui.cpp b/ui/ui.cpp index af7384fe..729715ab 100644 --- a/ui/ui.cpp +++ b/ui/ui.cpp @@ -1185,7 +1185,7 @@ static bool ConnectedAndRunning(BinaryView* view, uint64_t addr) void GlobalDebuggerUI::InitializeUI() { Sidebar::addSidebarWidgetType( - new DebuggerWidgetType(QImage(":/icons/images/debugger/debugger.svg"), "Debugger")); + new DebuggerWidgetType(QImage(":/debugger_icons/icons/debugger.svg"), "Debugger")); // We must use the sequence of these four calls to do the job, otherwise the keybinding does not work. // Though it really should be the case where I can specify the keybinding in the first registerAction() call.