Commit b8923c42 authored by dmMaze's avatar dmMaze
Browse files

wider qfontcombobox

parent e5f73d73
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -100,8 +100,9 @@ QFontComboBox#FontFamilyBox::hover {
SizeComboBox {
    padding-left: 6px;
    padding-right: 3px;
    font-size: 14px;
    width: 34px;
    font-size: 13px;
    min-width: 43px;
    max-width: 43px;
    border-color: #b3b6bf;
}

+6 −3
Original line number Diff line number Diff line
@@ -410,6 +410,7 @@ class SizeControlLabel(QLabel):
            self.cur_pos = new_pos
        return super().mouseMoveEvent(e)


class FontFormatPanel(Widget):
    
    textblk_item: TextBlkItem = None
@@ -519,6 +520,8 @@ class FontFormatPanel(Widget):
        self.fontfmtLabel.setText(self.global_fontfmt_str)
        self.fontfmtLabel.setFont(font)

        FONTFORMAT_SPACING = 6

        hl0 = QHBoxLayout()
        hl0.addStretch(1)
        hl0.addWidget(self.fontfmtLabel)
@@ -528,20 +531,20 @@ class FontFormatPanel(Widget):
        hl1.addWidget(self.fontsizebox)
        hl1.addWidget(self.lineSpacingLabel)
        hl1.addWidget(self.lineSpacingBox)
        hl1.setSpacing(10)
        hl1.setSpacing(4)
        hl2 = QHBoxLayout()
        hl2.setAlignment(Qt.AlignmentFlag.AlignCenter)
        hl2.addWidget(self.colorPicker)
        hl2.addWidget(self.alignBtnGroup)
        hl2.addWidget(self.formatBtnGroup)
        hl2.addWidget(self.verticalChecker)
        hl2.setSpacing(10)
        hl2.setSpacing(FONTFORMAT_SPACING)
        hl2.setContentsMargins(0, 0, 0, 0)
        hl3 = QHBoxLayout()
        hl3.setAlignment(Qt.AlignmentFlag.AlignLeft)
        hl3.addLayout(stroke_hlayout)
        hl3.addLayout(lettersp_hlayout)
        hl3.setContentsMargins(5, 5, 5, 5)
        hl3.setContentsMargins(3, 3, 3, 3)
        hl3.setSpacing(13)

        self.vlayout.addLayout(hl0)
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ class TextPanel(Widget):
        self.formatpanel = FontFormatPanel(app, canvas, self)
        layout.addWidget(self.formatpanel)
        layout.addWidget(self.textEditList)
        layout.setContentsMargins(10, 0, 10, 0)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(14)
        layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
+2 −2
Original line number Diff line number Diff line
from qtpy.QtWidgets import QGraphicsDropShadowEffect, QGraphicsOpacityEffect, QFrame, QWidget, QComboBox, QLabel, QSizePolicy, QDialog, QProgressBar, QMessageBox, QVBoxLayout, QStylePainter, QStyleOption, QStyle, QSlider, QProxyStyle, QStyle, QStyleOptionSlider, QColorDialog
from qtpy.QtWidgets import QGraphicsOpacityEffect, QFrame, QWidget, QComboBox, QLabel, QSizePolicy, QDialog, QProgressBar, QMessageBox, QVBoxLayout, QStyle, QSlider, QProxyStyle, QStyle, QStyleOptionSlider, QColorDialog
from qtpy.QtCore import Qt, QPropertyAnimation, QEasingCurve, QPointF, QRect, Signal, QSizeF, QObject, QEvent
from qtpy.QtGui import QFontMetrics, QMouseEvent, QShowEvent, QWheelEvent, QResizeEvent, QKeySequence, QPainter, QTextFrame, QTransform, QTextBlock, QAbstractTextDocumentLayout, QTextLayout, QFont, QFontMetrics, QColor
from qtpy.QtGui import QFontMetrics, QMouseEvent, QShowEvent, QWheelEvent, QPainter, QFontMetrics, QColor
from typing import List, Union, Tuple

from .constants import CONFIG_COMBOBOX_LONG, CONFIG_COMBOBOX_MIDEAN, CONFIG_COMBOBOX_SHORT