Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
Palapeli
Commits
c919727f
Commit
c919727f
authored
Apr 25, 2010
by
Stefan Majewsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak appearance of ConfigDialog.
svn path=/trunk/KDE/kdegames/palapeli/; revision=1118569
parent
b0a47292
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
13 deletions
+85
-13
src/config/configdialog.cpp
src/config/configdialog.cpp
+12
-0
src/config/configdialog.h
src/config/configdialog.h
+2
-0
src/settings.ui
src/settings.ui
+71
-13
No files found.
src/config/configdialog.cpp
View file @
c919727f
...
...
@@ -58,6 +58,7 @@ void Palapeli::TriggerComboBox::handleCurrentIndexChanged(int index)
Palapeli
::
ConfigDialog
::
ConfigDialog
(
QWidget
*
parent
)
:
KConfigDialog
(
parent
,
QString
(),
Settings
::
self
())
,
m_triggerPage
(
new
Palapeli
::
TriggerConfigWidget
)
,
m_shownForFirstTime
(
false
)
{
//setup page "General settings"
QWidget
*
generalPage
=
new
QWidget
;
...
...
@@ -96,6 +97,17 @@ void Palapeli::ConfigDialog::updateWidgetsDefault()
m_triggerPage
->
updateWidgetsDefault
();
}
void
Palapeli
::
ConfigDialog
::
showEvent
(
QShowEvent
*
event
)
{
KConfigDialog
::
showEvent
(
event
);
//the dialog is usually created a bit small
if
(
!
m_shownForFirstTime
)
{
resize
(
minimumSize
().
expandedTo
(
geometry
().
size
())
+
QSize
(
50
,
100
));
m_shownForFirstTime
=
true
;
}
}
//END Palapeli::ConfigDialog
#include "configdialog.moc"
...
...
src/config/configdialog.h
View file @
c919727f
...
...
@@ -38,9 +38,11 @@ namespace Palapeli
virtual
void
updateSettings
();
virtual
void
updateWidgets
();
virtual
void
updateWidgetsDefault
();
virtual
void
showEvent
(
QShowEvent
*
event
);
private:
Ui
::
Settings
m_generalUi
;
Palapeli
::
TriggerConfigWidget
*
m_triggerPage
;
bool
m_shownForFirstTime
;
};
}
...
...
src/settings.ui
View file @
c919727f
...
...
@@ -6,7 +6,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
4
90
</width>
<width>
4
52
</width>
<height>
327
</height>
</rect>
</property>
...
...
@@ -34,14 +34,37 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<item
row=
"0"
column=
"2"
>
<widget
class=
"KColorButton"
name=
"kcfg_ViewBackgroundColor"
>
<property
name=
"defaultColor"
>
<color>
<red>
255
</red>
<green>
255
</green>
<blue>
255
</blue>
</color>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_3"
>
<property
name=
"title"
>
<string>
Piece behavior
</string>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::ExpandingFieldsGrow
</enum>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_1"
>
<property
name=
"text"
>
<string
comment=
"@label:slider"
>
Snapping precision:
</string>
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"1"
colspan=
"2"
>
<item
row=
"
0
"
column=
"1"
>
<widget
class=
"QSlider"
name=
"kcfg_SnappingPrecision"
>
<property
name=
"minimum"
>
<number>
10
</number>
...
...
@@ -66,16 +89,51 @@
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<widget
class=
"KColorButton"
name=
"kcfg_ViewBackgroundColor"
>
<property
name=
"defaultColor"
>
<color>
<red>
255
</red>
<green>
255
</green>
<blue>
255
</blue>
</color>
</property>
</widget>
<item
row=
"2"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string
extracomment=
"description for the "snapping precision" setting"
>
Very precise (harder)
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::MinimumExpanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
0
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string
extracomment=
"description for the "snapping precision" setting"
>
Unprecise (easier)
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
...
...
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