Skip to content

Commit

Permalink
Merge pull request #215 from Los-Socketes/menu
Browse files Browse the repository at this point in the history
Menu
  • Loading branch information
antopell authored Dec 5, 2023
2 parents c4bb51f + 721f44c commit 689a225
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/client/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>
#include <QScrollArea>
#include <QStackedWidget>
#include <QFontDatabase>
#include <QPixmap>
Expand Down Expand Up @@ -103,12 +104,22 @@ InformacionInicial Menu::ejecutar(int argc, char* argv[], bool& es_host) {

QHBoxLayout *layoutHorizontalCrear = new QHBoxLayout();
QVBoxLayout *botonesCrear = new QVBoxLayout();
QWidget* scrollCrear = new QWidget;
scrollCrear->setLayout( botonesCrear );
QScrollArea* scrollAreaCrear = new QScrollArea;

scrollCrear->setStyleSheet("background-color:#cc8835");
scrollAreaCrear->setStyleSheet("background-color:#f2ece9;");
scrollAreaCrear->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
scrollAreaCrear->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
scrollAreaCrear->setWidgetResizable( true );
scrollAreaCrear->setWidget( scrollCrear );

QSpacerItem *espacioIzqBotonesCrear = new QSpacerItem(100, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
QSpacerItem *espacioDerBotonesCrear = new QSpacerItem(100, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

layoutHorizontalCrear->addItem(espacioIzqBotonesCrear);
layoutHorizontalCrear->addLayout(botonesCrear);
layoutHorizontalCrear->addWidget(scrollAreaCrear);
layoutHorizontalCrear->addItem(espacioDerBotonesCrear);
verticalLayoutCrear->addLayout(layoutHorizontalCrear);

Expand All @@ -130,12 +141,22 @@ InformacionInicial Menu::ejecutar(int argc, char* argv[], bool& es_host) {

QHBoxLayout *layoutHorizontalUnirse = new QHBoxLayout();
QVBoxLayout *botonesUnirse = new QVBoxLayout();
QWidget* scrollUnirse = new QWidget;
scrollUnirse->setLayout( botonesUnirse );
QScrollArea* scrollAreaUnirse = new QScrollArea;

scrollUnirse->setStyleSheet("background-color:#cc8835");
scrollAreaUnirse->setStyleSheet("background-color:#f2ece9;");
scrollAreaUnirse->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
scrollAreaUnirse->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
scrollAreaUnirse->setWidgetResizable( true );
scrollAreaUnirse->setWidget( scrollUnirse );

QSpacerItem *espacioIzqBotonesUnirse = new QSpacerItem(100, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
QSpacerItem *espacioDerBotonesUnirse = new QSpacerItem(100, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);

layoutHorizontalUnirse->addItem(espacioIzqBotonesUnirse);
layoutHorizontalUnirse->addLayout(botonesUnirse);
layoutHorizontalUnirse->addWidget(scrollAreaUnirse);
layoutHorizontalUnirse->addItem(espacioDerBotonesUnirse);
verticalLayoutUnirse->addLayout(layoutHorizontalUnirse);

Expand Down

0 comments on commit 689a225

Please sign in to comment.