adopt for Qt6
This commit is contained in:
@@ -20,6 +20,7 @@ if (MARKDOWN_LIBRARY)
|
||||
qad_library(doc "Core" "${MARKDOWN_LIBRARY}")
|
||||
if(NOT _mkd_header_found)
|
||||
message(STATUS "Found markdown library, but *.h missing!")
|
||||
add_definitions("-DMARKDOWN_HEADER=\"markdown/markdown.h\"")
|
||||
endif()
|
||||
else()
|
||||
add_definitions("-DNO_MARKDOWN")
|
||||
|
||||
@@ -193,7 +193,8 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
||||
selpen = palette().color(QPalette::WindowText);
|
||||
selpen.setStyle(Qt::DashLine);
|
||||
back_color = palette().color(QPalette::Base);
|
||||
buttons_ = AllButtons;
|
||||
back_color.setAlpha(255);
|
||||
buttons_ = AllButtons;
|
||||
setOpenGL(false);
|
||||
setButtonsPosition(Graphic::Left);
|
||||
setAntialiasing(false);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef osm_types_h
|
||||
#define osm_types_h
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QPixmap>
|
||||
|
||||
namespace OSM {
|
||||
|
||||
@@ -120,8 +120,10 @@ void VirtualKeyboard::adjust() {
|
||||
for (auto p: pages)
|
||||
cols = piMaxi(cols, p->buttonColumns());
|
||||
if (cols < 1) return;
|
||||
int spacing = style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr, this);
|
||||
int pixel_width = width() - spacing * (cols - 1) - ui->verticalLayout->margin() * 2;
|
||||
int spacing = style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr, this);
|
||||
int m[4] = {0, 0, 0, 0};
|
||||
ui->verticalLayout->getContentsMargins(&m[0], &m[1], &m[2], &m[3]);
|
||||
int pixel_width = width() - spacing * (cols - 1) - m[0] * 2;
|
||||
int bw = piMaxi(2, pixel_width / cols);
|
||||
ui->stackedPages->setStyleSheet(QString("font:%1px").arg(bw / 2));
|
||||
for (auto p: pages)
|
||||
|
||||
Reference in New Issue
Block a user