Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
77aa2783
Commit
77aa2783
authored
12 years ago
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some little things
parent
1d06110b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+1
-1
UBTeacherGuideWidgetsTools.cpp
src/gui/UBTeacherGuideWidgetsTools.cpp
+19
-4
UBTeacherGuideWidgetsTools.h
src/gui/UBTeacherGuideWidgetsTools.h
+1
-0
No files found.
src/gui/UBTeacherGuideWidget.cpp
View file @
77aa2783
...
@@ -1023,7 +1023,7 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
...
@@ -1023,7 +1023,7 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
QString
inputStyleSheet
(
"QTextEdit { background: white; border-radius: 10px; border: 2px;}"
);
QString
inputStyleSheet
(
"QTextEdit { background: white; border-radius: 10px; border: 2px;}"
);
mpModePushButton
->
hide
();
mpModePushButton
->
hide
();
mpSessionTitle
->
setReadOnly
(
false
);
mpSessionTitle
->
setReadOnly
(
false
);
mpSessionTitle
->
managePlaceholder
(
fals
e
);
mpSessionTitle
->
managePlaceholder
(
tru
e
);
mpSessionTitle
->
setStyleSheet
(
inputStyleSheet
);
mpSessionTitle
->
setStyleSheet
(
inputStyleSheet
);
QFont
titleFont
(
QApplication
::
font
().
family
(),
11
,
-
1
);
QFont
titleFont
(
QApplication
::
font
().
family
(),
11
,
-
1
);
mpSessionTitle
->
document
()
->
setDefaultFont
(
titleFont
);
mpSessionTitle
->
document
()
->
setDefaultFont
(
titleFont
);
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBTeacherGuideWidgetsTools.cpp
View file @
77aa2783
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
#include <QApplication>
#include <QApplication>
#include <QDomElement>
#include <QDomElement>
#include <QWebFrame>
#include <QWebFrame>
#include <QTextDocument>
#include <QTextBlock>
#include <QTextCursor>
#include "UBTeacherGuideWidgetsTools.h"
#include "UBTeacherGuideWidgetsTools.h"
...
@@ -190,10 +193,11 @@ void UBTGAdaptableText::onTextChanged()
...
@@ -190,10 +193,11 @@ void UBTGAdaptableText::onTextChanged()
mIsUpdatingSize
=
true
;
mIsUpdatingSize
=
true
;
if
(
documentSize
<
mMinimumHeight
)
if
(
documentSize
<
mMinimumHeight
)
{
setFixedHeight
(
mMinimumHeight
);
setFixedHeight
(
mMinimumHeight
);
else
}
else
{
setFixedHeight
(
documentSize
+
mBottomMargin
);
setFixedHeight
(
documentSize
+
mBottomMargin
);
}
updateGeometry
();
updateGeometry
();
//to trig a resize on the tree widget item
//to trig a resize on the tree widget item
...
@@ -245,6 +249,7 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
...
@@ -245,6 +249,7 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
setTextColor
(
QColor
(
Qt
::
black
));
setTextColor
(
QColor
(
Qt
::
black
));
setPlainText
(
""
);
setPlainText
(
""
);
}
}
setCursorToTheEnd
();
}
else
{
}
else
{
if
(
toPlainText
().
isEmpty
()){
if
(
toPlainText
().
isEmpty
()){
setTextColor
(
QColor
(
Qt
::
lightGray
));
setTextColor
(
QColor
(
Qt
::
lightGray
));
...
@@ -253,6 +258,16 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
...
@@ -253,6 +258,16 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
}
}
}
}
void
UBTGAdaptableText
::
setCursorToTheEnd
(){
QTextDocument
*
doc
=
document
();
if
(
NULL
!=
doc
){
QTextBlock
block
=
doc
->
lastBlock
();
QTextCursor
cursor
(
doc
);
cursor
.
setPosition
(
block
.
position
()
+
block
.
length
()
-
1
);
setTextCursor
(
cursor
);
}
}
/***************************************************************************
/***************************************************************************
* class UBTGDraggableWeb *
* class UBTGDraggableWeb *
***************************************************************************/
***************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBTeacherGuideWidgetsTools.h
View file @
77aa2783
...
@@ -112,6 +112,7 @@ protected:
...
@@ -112,6 +112,7 @@ protected:
void
focusOutEvent
(
QFocusEvent
*
e
);
void
focusOutEvent
(
QFocusEvent
*
e
);
private
:
private
:
void
setCursorToTheEnd
();
int
mBottomMargin
;
int
mBottomMargin
;
QTreeWidgetItem
*
mpTreeWidgetItem
;
QTreeWidgetItem
*
mpTreeWidgetItem
;
int
mMinimumHeight
;
int
mMinimumHeight
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment