diff --git a/lang/zh_CN/winghex_zh_CN.ts b/lang/zh_CN/winghex_zh_CN.ts index a5f71b6..be3f233 100644 --- a/lang/zh_CN/winghex_zh_CN.ts +++ b/lang/zh_CN/winghex_zh_CN.ts @@ -410,72 +410,72 @@ EditorView - + Cut 剪切 - + CutHex 剪切(十六进制) - + Copy 复制 - + CopyHex 复制(十六进制) - + Paste 粘贴 - + PasteHex 粘贴(十六进制) - + Delete 删除 - + Find 查找 - + Goto 跳转 - + Fill 填充 - + MetaData 标注 - + BookMark 书签 - + Untitled 未命名 - + Not allowed operation in non-UI thread 该操作在非 UI 线程非法 diff --git a/lang/zh_TW/winghex_zh_TW.ts b/lang/zh_TW/winghex_zh_TW.ts index ebe5793..9d3087f 100644 --- a/lang/zh_TW/winghex_zh_TW.ts +++ b/lang/zh_TW/winghex_zh_TW.ts @@ -410,72 +410,72 @@ EditorView - + Cut 剪切 - + CutHex 剪切(十六進制) - + Copy 複製 - + CopyHex 複製(十六進制) - + Paste 粘貼 - + PasteHex 粘貼(十六進制) - + Delete 刪除 - + Find 查找 - + Goto 跳轉 - + Fill 填充 - + MetaData 標注 - + BookMark 書簽 - + Untitled 未命名 - + Not allowed operation in non-UI thread 該操作在非 UI 線程非法 diff --git a/main.cpp b/main.cpp index 959928e..e1cd487 100644 --- a/main.cpp +++ b/main.cpp @@ -20,6 +20,17 @@ int main(int argc, char *argv[]) { QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); +#ifdef Q_OS_LINUX + // fix wayland issue (a workaround): floating dock not work + // reference: + // https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/ + // issues/714#issuecomment-2802752677 + if (qgetenv("XDG_SESSION_TYPE") + .compare(QByteArrayLiteral("wayland"), Qt::CaseInsensitive) == 0) { + qputenv("QT_QPA_PLATFORM", "xcb"); + } +#endif + QApplication::setApplicationName(APP_NAME); QApplication::setOrganizationName(APP_ORG); QApplication::setApplicationVersion(WINGHEX_VERSION); diff --git a/src/control/editorview.cpp b/src/control/editorview.cpp index 3abbda0..bd0c727 100644 --- a/src/control/editorview.cpp +++ b/src/control/editorview.cpp @@ -63,7 +63,8 @@ EditorView::EditorView(QWidget *parent) auto hexLayout = new QVBoxLayout(m_hexContainer); hexLayout->setSpacing(0); hexLayout->setContentsMargins(0, 0, 0, 0); - m_hex = new QHexView; + m_hex = new QHexView(this); + m_hex->setScaleRate(1); hexLayout->addWidget(m_hex, 1); m_goto = new GotoWidget(this); connect(m_goto, &GotoWidget::jumpToLine, this,