Amélioration de l'interface toolbar
This commit is contained in:
parent
a3fe83c343
commit
906297294d
|
@ -1,28 +1,49 @@
|
|||
/**
|
||||
* Feuille de style pour l'interface de Skizzle
|
||||
*/
|
||||
|
||||
* {
|
||||
FontName: overpass;
|
||||
FontSize: 14;
|
||||
Color: #111111ff;
|
||||
}
|
||||
|
||||
Window {
|
||||
BackgroundColor: #FFFFFFff;
|
||||
BackgroundColor: #FFFFFFff;
|
||||
BorderWidth: 0;
|
||||
}
|
||||
|
||||
ScrolledWindow {
|
||||
BorderWidth: 0;
|
||||
ScrollbarWidth: 0;
|
||||
}
|
||||
|
||||
Button {
|
||||
Color: #000000ff;
|
||||
Scrollbar {
|
||||
BorderWidth: 0;
|
||||
BackgroundColor: #E6E6E6ff;
|
||||
SliderColor: #B4B4B4ff;
|
||||
TroughColor: #E6E6E6ff;
|
||||
StepperArrowColor: #111111ff;
|
||||
StepperBackgroundColor: #B4B4B4ff;
|
||||
}
|
||||
|
||||
Button:PRELIGHT {
|
||||
Button, RadioButton {
|
||||
Color: #000000ff;
|
||||
BackgroundColor: #E6E6E6ff;
|
||||
|
||||
BorderWidth: 0;
|
||||
Spacing: 10;
|
||||
}
|
||||
|
||||
Button:PRELIGHT, RadioButton:PRELIGHT {
|
||||
Color: #000000ff;
|
||||
BackgroundColor: #D2D2D2ff;
|
||||
}
|
||||
|
||||
Button:ACTIVE {
|
||||
Button:ACTIVE, RadioButton:ACTIVE {
|
||||
Color: #000000ff;
|
||||
BackgroundColor: #B4B4B4ff;
|
||||
}
|
||||
|
||||
* {
|
||||
Color: #000000ff;
|
||||
Separator {
|
||||
Color: #D2D2D2ff;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,12 @@ Toolbar::Toolbar(Editor& editor) : editor(editor) {
|
|||
toolbar_box->PackEnd(save_button);
|
||||
|
||||
// ajout des créateurs de blocs
|
||||
sfg::Alignment::Ptr spacer = sfg::Alignment::Create();
|
||||
spacer->SetRequisition(sf::Vector2f(1, 5));
|
||||
|
||||
toolbar_box->PackEnd(spacer);
|
||||
toolbar_box->PackEnd(sfg::Label::Create(L"Choix de l'objet"));
|
||||
toolbar_box->PackEnd(sfg::Separator::Create());
|
||||
toolbar_box->PackEnd(sfg::Label::Create(L"Type d'objet à placer"));
|
||||
|
||||
addCreator(L"Bloc normal", std::bind(&Toolbar::createBlock, this));
|
||||
addCreator(L"Caisse", std::bind(&Toolbar::createMovableBlock, this));
|
||||
|
@ -55,6 +59,9 @@ Toolbar::Toolbar(Editor& editor) : editor(editor) {
|
|||
&Toolbar::createGravityBlock, this, GravityDirection::WEST
|
||||
));
|
||||
|
||||
// on sélectionne le premier créateur par défaut
|
||||
creators.begin()->first->SetActive(true);
|
||||
|
||||
// création de la fenêtre de la barre d'outils
|
||||
scrolled_zone = sfg::ScrolledWindow::Create();
|
||||
toolbar_window = sfg::Window::Create(sfg::Window::Style::BACKGROUND);
|
||||
|
|
Loading…
Reference in New Issue