diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd84287..b4598b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure everything working-directory: ${{runner.workspace}}/build - run: cmake -DCMAKE_PREFIX_PATH="/opt/qt-6.4.2-static-universal-macos12.3" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ../UEFITool + run: cmake -DCMAKE_PREFIX_PATH="/opt/qt-6.5.0-static-universal-macos" -DCMAKE_OSX_ARCHITECTURES="x86_64h;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" ../UEFITool - name: Build everything working-directory: ${{runner.workspace}}/build shell: bash diff --git a/UEFITool/hexviewdialog.cpp b/UEFITool/hexviewdialog.cpp index 0eccf5a..39b5559 100644 --- a/UEFITool/hexviewdialog.cpp +++ b/UEFITool/hexviewdialog.cpp @@ -64,4 +64,5 @@ void HexViewDialog::setItem(const UModelIndex & index, HexViewType type) dialogTitle += itemText.isEmpty() ? itemName : itemName + " | " + itemText; setWindowTitle(dialogTitle); hexView->setData(hexdata); + hexView->setFont(QApplication::font()); } diff --git a/UEFITool/qhexview5/qhexview.cpp b/UEFITool/qhexview5/qhexview.cpp index f2820af..d5b82b6 100644 --- a/UEFITool/qhexview5/qhexview.cpp +++ b/UEFITool/qhexview5/qhexview.cpp @@ -33,8 +33,7 @@ QHexView::QHexView(QWidget *parent) : QAbstractScrollArea(parent), m_fontmetrics { QFont f = QFontDatabase::systemFont(QFontDatabase::FixedFont); - if(f.styleHint() != QFont::TypeWriter) - { + if (f.styleHint() != QFont::TypeWriter) { f.setFamily("Monospace"); // Force Monospaced font f.setStyleHint(QFont::TypeWriter); } @@ -1216,8 +1215,12 @@ void QHexView::mouseMoveEvent(QMouseEvent* e) void QHexView::wheelEvent(QWheelEvent* e) { e->ignore(); +#if defined Q_OS_OSX + // In macOS scrollbar invisibility should not prevent scrolling from working + if(!m_hexdocument) return; +#else if(!m_hexdocument || !this->verticalScrollBar()->isVisible()) return; - +#endif auto ydelta = e->angleDelta().y(); if(ydelta > 0) this->verticalScrollBar()->setValue(this->verticalScrollBar()->value() - m_options.scrollsteps); else if(ydelta < 0) this->verticalScrollBar()->setValue(this->verticalScrollBar()->value() + m_options.scrollsteps);