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
0055bf39
Commit
0055bf39
authored
Apr 28, 2011
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put the stylus palette horizontal and centered down the screen.
parent
e2fab2e0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
4 deletions
+35
-4
UBBoardController.cpp
src/board/UBBoardController.cpp
+1
-0
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+5
-0
UBBoardPaletteManager.h
src/board/UBBoardPaletteManager.h
+1
-0
UBSettings.cpp
src/core/UBSettings.cpp
+1
-1
UBFloatingPalette.h
src/gui/UBFloatingPalette.h
+2
-2
UBStylusPalette.cpp
src/gui/UBStylusPalette.cpp
+22
-0
UBStylusPalette.h
src/gui/UBStylusPalette.h
+3
-1
No files found.
src/board/UBBoardController.cpp
View file @
0055bf39
...
...
@@ -118,6 +118,7 @@ void UBBoardController::init()
UBDocumentProxy
*
doc
=
UBPersistenceManager
::
persistenceManager
()
->
createDocument
();
setActiveDocumentScene
(
doc
);
undoRedoStateChange
(
true
);
}
...
...
src/board/UBBoardPaletteManager.cpp
View file @
0055bf39
...
...
@@ -92,6 +92,10 @@ UBBoardPaletteManager::~UBBoardPaletteManager()
}
}
void
UBBoardPaletteManager
::
initPalettesPosAtStartup
()
{
mStylusPalette
->
initPosition
();
}
void
UBBoardPaletteManager
::
setupLayout
()
{
...
...
@@ -342,6 +346,7 @@ void UBBoardPaletteManager::containerResized()
mStylusPalette
->
move
(
userLeft
,
userTop
);
mStylusPalette
->
adjustSizeAndPosition
();
mStylusPalette
->
initPosition
();
mZoomPalette
->
move
(
userLeft
+
userWidth
-
mZoomPalette
->
width
()
,
userTop
+
userHeight
/*- mPageNumberPalette->height()*/
-
innerMargin
-
mZoomPalette
->
height
());
...
...
src/board/UBBoardPaletteManager.h
View file @
0055bf39
...
...
@@ -37,6 +37,7 @@ class UBBoardPaletteManager : public QObject
void
setupLayout
();
UBNavigatorPalette
*
navigatorPalette
(){
return
mNavigPalette
;}
void
showVirtualKeyboard
(
bool
show
=
true
);
void
initPalettesPosAtStartup
();
public
slots
:
...
...
src/core/UBSettings.cpp
View file @
0055bf39
...
...
@@ -167,7 +167,7 @@ void UBSettings::init()
appToolBarDisplayText
=
new
UBSetting
(
this
,
"App"
,
"ToolBarDisplayText"
,
true
);
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
true
);
appEnableSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableSoftwareUpdates"
,
true
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
tru
e
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
fals
e
);
navigPaletteWidth
=
new
UBSetting
(
this
,
"Board"
,
"NavigPaletteWidth"
,
300
);
libPaletteWidth
=
new
UBSetting
(
this
,
"Board"
,
"LibPaletteWidth"
,
300
);
...
...
src/gui/UBFloatingPalette.h
View file @
0055bf39
...
...
@@ -57,16 +57,16 @@ class UBFloatingPalette : public QWidget
bool
mbGrip
;
static
const
int
sLayoutContentMargin
=
12
;
static
const
int
sLayoutSpacing
=
15
;
void
moveInsideParent
(
const
QPoint
&
position
);
bool
mCustomPosition
;
private
:
void
moveInsideParent
(
const
QPoint
&
position
);
void
removeAllAssociatedPalette
();
void
minimizePalette
(
const
QPoint
&
pos
);
QList
<
UBFloatingPalette
*>
mAssociatedPalette
;
QPoint
mDragPosition
;
bool
mIsMoving
;
bool
mCustomPosition
;
bool
mCanBeMinimized
;
eMinimizedLocation
mMinimizedLocation
;
Qt
::
Corner
mDefaultPosition
;
...
...
src/gui/UBStylusPalette.cpp
View file @
0055bf39
...
...
@@ -57,6 +57,8 @@ UBStylusPalette::UBStylusPalette(QWidget *parent, Qt::Orientation orient)
adjustSizeAndPosition
();
initPosition
();
foreach
(
const
UBActionPaletteButton
*
button
,
mButtons
)
{
connect
(
button
,
SIGNAL
(
doubleClicked
()),
this
,
SLOT
(
stylusToolDoubleClicked
()));
...
...
@@ -64,6 +66,26 @@ UBStylusPalette::UBStylusPalette(QWidget *parent, Qt::Orientation orient)
}
void
UBStylusPalette
::
initPosition
()
{
if
(
!
UBSettings
::
settings
()
->
appToolBarOrientationVertical
->
get
().
toBool
())
{
QWidget
*
pParentW
=
parentWidget
();
if
(
NULL
!=
pParentW
)
{
mCustomPosition
=
true
;
QPoint
pos
;
int
parentWidth
=
pParentW
->
width
();
int
parentHeight
=
pParentW
->
height
();
int
posX
=
(
parentWidth
/
2
)
-
(
width
()
/
2
);
int
posY
=
parentHeight
-
border
()
-
height
();
pos
.
setX
(
posX
);
pos
.
setY
(
posY
);
moveInsideParent
(
pos
);
}
}
}
UBStylusPalette
::~
UBStylusPalette
()
{
...
...
src/gui/UBStylusPalette.h
View file @
0055bf39
...
...
@@ -12,9 +12,11 @@ class UBStylusPalette : public UBActionPalette
Q_OBJECT
;
public
:
UBStylusPalette
(
QWidget
*
parent
=
0
,
Qt
::
Orientation
orient
=
Qt
::
Vertical
);
UBStylusPalette
(
QWidget
*
parent
=
0
,
Qt
::
Orientation
orient
=
Qt
::
Vertical
);
virtual
~
UBStylusPalette
();
void
initPosition
();
private
slots
:
void
stylusToolDoubleClicked
();
...
...
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