Use static Qt 6.5.0 for universal macOS builds

This commit is contained in:
Nikolaj Schlej 2023-04-23 14:59:43 -07:00
parent 40fed25637
commit 1958ed7fa9
3 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,7 @@ jobs:
run: cmake -E make_directory ${{runner.workspace}}/build run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure everything - name: Configure everything
working-directory: ${{runner.workspace}}/build 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 - name: Build everything
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build
shell: bash shell: bash

View File

@ -64,4 +64,5 @@ void HexViewDialog::setItem(const UModelIndex & index, HexViewType type)
dialogTitle += itemText.isEmpty() ? itemName : itemName + " | " + itemText; dialogTitle += itemText.isEmpty() ? itemName : itemName + " | " + itemText;
setWindowTitle(dialogTitle); setWindowTitle(dialogTitle);
hexView->setData(hexdata); hexView->setData(hexdata);
hexView->setFont(QApplication::font());
} }

View File

@ -33,8 +33,7 @@ QHexView::QHexView(QWidget *parent) : QAbstractScrollArea(parent), m_fontmetrics
{ {
QFont f = QFontDatabase::systemFont(QFontDatabase::FixedFont); QFont f = QFontDatabase::systemFont(QFontDatabase::FixedFont);
if(f.styleHint() != QFont::TypeWriter) if (f.styleHint() != QFont::TypeWriter) {
{
f.setFamily("Monospace"); // Force Monospaced font f.setFamily("Monospace"); // Force Monospaced font
f.setStyleHint(QFont::TypeWriter); f.setStyleHint(QFont::TypeWriter);
} }
@ -1216,8 +1215,12 @@ void QHexView::mouseMoveEvent(QMouseEvent* e)
void QHexView::wheelEvent(QWheelEvent* e) void QHexView::wheelEvent(QWheelEvent* e)
{ {
e->ignore(); 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; if(!m_hexdocument || !this->verticalScrollBar()->isVisible()) return;
#endif
auto ydelta = e->angleDelta().y(); auto ydelta = e->angleDelta().y();
if(ydelta > 0) this->verticalScrollBar()->setValue(this->verticalScrollBar()->value() - m_options.scrollsteps); 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); else if(ydelta < 0) this->verticalScrollBar()->setValue(this->verticalScrollBar()->value() + m_options.scrollsteps);