git-svn-id: svn://db.shs.com.ru/libs@335 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-11-30 09:17:35 +00:00
parent 8cdbe203bf
commit 05c49c1e5d
4 changed files with 9 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include <QDebug>
#include <QHeaderView>
#include "ecombobox.h"
#include "qad_types.h"
class EModel: public QStandardItemModel {
@@ -36,6 +37,8 @@ EComboBox::EComboBox(QWidget * parent): QComboBox(parent) {
iv.setDragDropMode(QAbstractItemView::InternalMove);
iv.setMinimumHeight(100);
icon.setPixmap(QPixmap(":/icons/edit-find.png"));
icon.setScaledContents(true);
icon.setFixedSize(QSize(fontHeight(), fontHeight()));
ifont = nfont = font();
ifont.setItalic(true);
#if QT_VERSION >= 0x040700

View File

@@ -10,6 +10,7 @@
#include <QAction>
#include <QApplication>
#include <QHeaderView>
#include "qad_types.h"
QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) {
@@ -65,6 +66,7 @@ QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) {
textCode->setFrameShape(QFrame::NoFrame);
textCode->setLineWrapMode(QPlainTextEdit::NoWrap);
textCode->setTabChangesFocus(false);
textCode->setCursorWidth(qMax<int>(qRound(fontHeight() / 10.), 1));
textLines->setFrameShadow(QFrame::Plain);
textLines->setFrameShape(QFrame::NoFrame);
textLines->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
@@ -795,7 +797,7 @@ void QCodeEdit::raiseHelp(QTextCursor tc, int arg) {
tc.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor, st.size());
lbl_help[0]->setFont(font());
widget_help->resize(widget_help->sizeHint());
widget_help->move(textCode->mapToGlobal(textCode->cursorRect(tc).topLeft() - QPoint(0, widget_help->height() + 8)));
widget_help->move(textCode->viewport()->mapToGlobal(textCode->cursorRect(tc).topLeft()/* - QPoint(0, widget_help->height() + 8)*/));
widget_help->show();
cursor_scope = scope.first;
cursor_scope << scope.second;

View File

@@ -104,9 +104,10 @@ PathEdit::PathEdit(QWidget * parent): QWidget(parent), lay(QBoxLayout::LeftToRig
is_dir = is_abs = false;
filter = tr("All files(*)");
line = new CLineEdit(this);
line->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
butt_select = new QPushButton(this);
//butt_select->setIconSize(QSize(16, 16));
butt_select->setMaximumWidth(line->height());
butt_select->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
butt_select->setIcon(QIcon(":/icons/document-open.png"));
butt_select->setToolTip(tr("Choose") + " ...");
lay.setContentsMargins(0, 0, 0, 0);

View File

@@ -9,6 +9,7 @@
#include "qpointedit.h"
#include "evalspinbox.h"
#include <QCheckBox>
#include <QPushButton>
#include <QDoubleSpinBox>