0f85935fc8
- gz_integrator.py: GZCurve, GZPoint, compute_gz_wall_sided (fórmula pared lateral), compute_gz_direct (integración Sutherland-Hodgman) - imo_is2008.py: IMOCriterion, IMOResult, check_imo_is2008 — 6 criterios A.2.1.1–A.2.1.6 del IS Code 2008 Cap.2 - gz_curve_widget.py: GZCurveWidget QPainter — curva cian, áreas sombreadas, líneas IMO, marcador AVS, tabla PASS/FAIL integrada - main_window.py: GZCurveWidget en MOD_STABILITY, _compute_and_show_gz, _on_show_stability conectado al ribbon - dark.qss: estilos GZCurveWidget - test_module3_stability.py: 33 tests S-01..S-28 (315 total, todos pasan) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
543 lines
17 KiB
Plaintext
543 lines
17 KiB
Plaintext
/* ============================================================
|
|
AR-ShipDesign — Tema "Ocean Slate" v3
|
|
Paleta: slate azul-gris medio, navy para viewports
|
|
─────────────────────────────────────────────────────────
|
|
#2c3042 fondo principal (slate medio, NO negro)
|
|
#343848 paneles / ribbon / dock
|
|
#3e4255 elementos elevados
|
|
#484e62 hover / bordes
|
|
#575e74 bordes principales
|
|
#9aa3bc texto muted
|
|
#e2e7f5 texto principal
|
|
─── Viewport (zona de modelado) ───────────────────────
|
|
#1a1d30 canvas navy (fondo de la zona de dibujo)
|
|
#20233e título perspective (azul profundo)
|
|
#1e2c32 título profile (verde-azul marino)
|
|
#2a1e30 título bodyplan (índigo)
|
|
#1e2a1e título plan (verde oscuro)
|
|
─── Acento ────────────────────────────────────────────
|
|
#4da8ff azul eléctrico
|
|
============================================================ */
|
|
|
|
/* ─── BASE ─────────────────────────────────────────────────── */
|
|
|
|
* { outline: none; }
|
|
|
|
QMainWindow, QDialog, QWidget {
|
|
background-color: #2c3042;
|
|
color: #e2e7f5;
|
|
font-family: "Segoe UI", Arial, sans-serif;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* ─── MENÚ ──────────────────────────────────────────────────── */
|
|
|
|
QMenuBar {
|
|
background-color: #343848;
|
|
color: #e2e7f5;
|
|
border-bottom: 1px solid #575e74;
|
|
padding: 1px 0;
|
|
}
|
|
QMenuBar::item { padding: 4px 10px; background: transparent; }
|
|
QMenuBar::item:selected { background-color: #3e4255; color: #fff; }
|
|
QMenuBar::item:pressed { background-color: #4da8ff; color: #fff; }
|
|
|
|
QMenu {
|
|
background-color: #343848;
|
|
color: #e2e7f5;
|
|
border: 1px solid #575e74;
|
|
padding: 3px 0;
|
|
}
|
|
QMenu::item { padding: 5px 28px 5px 20px; }
|
|
QMenu::item:selected { background-color: #4da8ff; color: #fff; }
|
|
QMenu::item:disabled { color: #6b7792; }
|
|
QMenu::separator { height: 1px; background: #484e62; margin: 3px 8px; }
|
|
|
|
/* ─── RIBBON TOOLBAR (QToolBar contenedor) ──────────────────── */
|
|
|
|
QToolBar#ribbonToolbar {
|
|
background-color: #343848;
|
|
border: none;
|
|
border-bottom: 2px solid #4da8ff; /* línea acento bajo la ribbon */
|
|
padding: 0; margin: 0; spacing: 0;
|
|
}
|
|
|
|
/* ─── RIBBON BAR ────────────────────────────────────────────── */
|
|
|
|
QWidget#ribbonBar { background-color: #343848; }
|
|
|
|
/* Fila de pestañas */
|
|
QWidget#ribbonTabRow {
|
|
background-color: #2c3042;
|
|
border-bottom: 1px solid #484e62;
|
|
}
|
|
|
|
/* Pestañas */
|
|
QToolButton#ribbonTabBtn {
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
border-radius: 0;
|
|
padding: 0 16px;
|
|
color: #9aa3bc;
|
|
font-size: 12px;
|
|
min-width: 82px;
|
|
height: 26px;
|
|
}
|
|
QToolButton#ribbonTabBtn:hover { background-color: #3e4255; color: #d0d8ec; }
|
|
QToolButton#ribbonTabBtn:checked {
|
|
background-color: #343848;
|
|
color: #4da8ff;
|
|
border-bottom: 2px solid #4da8ff;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Stack de contenido */
|
|
QStackedWidget#ribbonContent {
|
|
background-color: #343848;
|
|
border-bottom: 1px solid #484e62;
|
|
}
|
|
|
|
/* Grupo */
|
|
QFrame#ribbonGroup {
|
|
background-color: transparent;
|
|
border: none;
|
|
margin: 2px 0;
|
|
}
|
|
QWidget#ribbonBtnArea { background-color: transparent; }
|
|
|
|
QLabel#ribbonGroupTitle {
|
|
color: #9aa3bc;
|
|
font-size: 10px;
|
|
padding: 2px 0 3px 0;
|
|
background-color: transparent;
|
|
}
|
|
|
|
QFrame#ribbonSep {
|
|
color: #3e4255;
|
|
margin: 6px 2px;
|
|
}
|
|
|
|
/* ── Botones de la ribbon ──
|
|
• font-size 12px para legibilidad clara
|
|
• min-width se fuerza desde Python (fontMetrics) para nunca partir en 2 líneas
|
|
• SIN max-width — texto siempre completo
|
|
• disabled: #7a8ba8 — contraste ≥ 3.5:1 sobre #343848 */
|
|
QToolButton#ribbonButton {
|
|
background: transparent;
|
|
color: #e2e7f5;
|
|
border: 1px solid transparent;
|
|
border-radius: 3px;
|
|
padding: 5px 10px 3px 10px;
|
|
font-size: 12px;
|
|
min-width: 56px;
|
|
}
|
|
QToolButton#ribbonButton:hover { background-color: #3e4255; border-color: #575e74; }
|
|
QToolButton#ribbonButton:pressed { background-color: #4da8ff; color: #fff; border-color: #4da8ff; }
|
|
QToolButton#ribbonButton:checked { background-color: #1a3d6e; border-color: #4da8ff; }
|
|
QToolButton#ribbonButton:disabled { color: #7a8ba8; }
|
|
|
|
/* ─── 4 VIEWPORTS ───────────────────────────────────────────── */
|
|
|
|
QWidget#fourViewport { background-color: #12152a; }
|
|
|
|
/* Frame externo de cada viewport — borde visible */
|
|
QFrame#viewportFrame {
|
|
background-color: #12152a;
|
|
border: 2px solid #2a3060;
|
|
}
|
|
|
|
/* ── Barras de título — cada vista tiene su propio color ────── */
|
|
|
|
/* Perspectiva 3D → azul profundo */
|
|
QWidget#viewportTitleBar_perspective {
|
|
background-color: #1e2550;
|
|
border-bottom: 1px solid #2d3a80;
|
|
}
|
|
QLabel#viewportTitle_perspective {
|
|
color: #6888d8;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Vista Lateral / Perfil → verde-teal marino */
|
|
QWidget#viewportTitleBar_profile {
|
|
background-color: #143040;
|
|
border-bottom: 1px solid #1e4a60;
|
|
}
|
|
QLabel#viewportTitle_profile {
|
|
color: #40a8b8;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Body Plan / Secciones → índigo / violeta */
|
|
QWidget#viewportTitleBar_bodyplan {
|
|
background-color: #28183c;
|
|
border-bottom: 1px solid #3c2460;
|
|
}
|
|
QLabel#viewportTitle_bodyplan {
|
|
color: #8868c8;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Vista de Planta → verde oscuro marino */
|
|
QWidget#viewportTitleBar_plan {
|
|
background-color: #142814;
|
|
border-bottom: 1px solid #1e4020;
|
|
}
|
|
QLabel#viewportTitle_plan {
|
|
color: #48a858;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Canvas de cada viewport → navy oscuro uniforme */
|
|
QWidget#viewportCanvas_perspective,
|
|
QWidget#viewportCanvas_profile,
|
|
QWidget#viewportCanvas_bodyplan,
|
|
QWidget#viewportCanvas_plan {
|
|
background-color: #1a1d30;
|
|
}
|
|
|
|
/* Texto watermark en el viewport */
|
|
QLabel#viewportPlaceholder {
|
|
color: #28305a;
|
|
font-size: 14px;
|
|
font-family: "Consolas", monospace;
|
|
font-weight: bold;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
/* ── Separadores arrastrables — visibles y amplios ─────────── */
|
|
QSplitter#viewportSplitter {
|
|
background-color: #12152a;
|
|
}
|
|
QSplitter#viewportSplitter::handle {
|
|
background-color: #2a3060;
|
|
}
|
|
QSplitter#viewportSplitter::handle:hover {
|
|
background-color: #4da8ff;
|
|
}
|
|
|
|
/* ─── DOCK WIDGETS ──────────────────────────────────────────── */
|
|
|
|
QDockWidget { color: #e2e7f5; font-weight: bold; font-size: 12px; }
|
|
QDockWidget::title {
|
|
background-color: #343848;
|
|
padding: 4px 8px;
|
|
border-bottom: 1px solid #575e74;
|
|
text-align: left;
|
|
}
|
|
QDockWidget::close-button, QDockWidget::float-button {
|
|
background: transparent; border: none; padding: 2px;
|
|
}
|
|
QDockWidget::close-button:hover, QDockWidget::float-button:hover {
|
|
background-color: #484e62; border-radius: 2px;
|
|
}
|
|
|
|
/* ─── PANEL DE CAPAS ────────────────────────────────────────── */
|
|
|
|
QWidget#layersPanel { background-color: #2c3042; }
|
|
QWidget#layersPanelHeader { background-color: #343848; border-bottom: 1px solid #575e74; }
|
|
|
|
QFrame#panelSep { color: #484e62; max-height: 1px; }
|
|
|
|
QScrollArea#layersScrollArea { background-color: #2c3042; border: none; }
|
|
QWidget#layersContainer { background-color: #2c3042; }
|
|
|
|
QWidget#layerRow { background-color: transparent; min-height: 26px; }
|
|
QWidget#layerRow:hover { background-color: #343848; }
|
|
|
|
QLabel#layerName { color: #c8d0e8; font-size: 12px; }
|
|
|
|
/* Indicador visibilidad: azul = visible, gris = oculta */
|
|
QToolButton#layerVisBtn {
|
|
background-color: #4da8ff;
|
|
border: none;
|
|
border-radius: 2px;
|
|
}
|
|
QToolButton#layerVisBtn:!checked {
|
|
background-color: #3e4255;
|
|
border: 1px solid #575e74;
|
|
}
|
|
QToolButton#layerVisBtn:hover { border: 1px solid #80c8ff; }
|
|
|
|
/* Indicador bloqueo: ámbar = bloqueada, gris = libre */
|
|
QToolButton#layerLockBtn {
|
|
background-color: #3e4255;
|
|
border: 1px solid #575e74;
|
|
border-radius: 2px;
|
|
}
|
|
QToolButton#layerLockBtn:checked {
|
|
background-color: #e8a020;
|
|
border-color: #e8a020;
|
|
}
|
|
QToolButton#layerLockBtn:hover { border: 1px solid #ffc840; }
|
|
|
|
/* ─── PANEL DE PROPIEDADES ──────────────────────────────────── */
|
|
|
|
QWidget#propContent { background-color: #2c3042; }
|
|
QLabel#propSection {
|
|
color: #9aa3bc;
|
|
font-size: 11px;
|
|
padding-bottom: 6px;
|
|
border-bottom: 1px solid #484e62;
|
|
margin-bottom: 4px;
|
|
}
|
|
QLabel#propKey { color: #9aa3bc; font-size: 12px; }
|
|
QLabel#propVal { color: #e2e7f5; font-size: 13px; }
|
|
|
|
/* ─── PANEL HIDROSTÁTICOS ───────────────────────────────────── */
|
|
|
|
QFrame#hydrostaticsPanel {
|
|
background-color: #20243a;
|
|
border-top: 2px solid #4da8ff;
|
|
}
|
|
QLabel#hydroTitle {
|
|
color: #6070a0;
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
padding: 0 10px 0 4px;
|
|
letter-spacing: 1px;
|
|
}
|
|
QFrame#hydroSep { color: #3e4255; }
|
|
QLabel#hydroKey { color: #9aa3bc; font-size: 11px; padding: 0 2px; }
|
|
QLabel#hydroVal {
|
|
color: #4da8ff;
|
|
font-family: "Consolas", monospace;
|
|
font-size: 12px;
|
|
min-width: 52px;
|
|
}
|
|
QLabel#hydroImoNone {
|
|
color: #6070a0;
|
|
font-family: "Consolas", monospace;
|
|
font-size: 12px;
|
|
}
|
|
QLabel#hydroImoOk {
|
|
color: #34c759;
|
|
font-family: "Consolas", monospace;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
QLabel#hydroImoFail {
|
|
color: #ff4530;
|
|
font-family: "Consolas", monospace;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* ─── MÓDULOS PLACEHOLDER ───────────────────────────────────── */
|
|
|
|
QWidget#modulePlaceholder { background-color: #2c3042; }
|
|
|
|
QLabel#placeholderTitle {
|
|
color: #4a5878;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
}
|
|
QLabel#placeholderDesc { color: #404e68; font-size: 13px; }
|
|
QLabel#placeholderMsg { color: #363e54; font-size: 12px; }
|
|
|
|
/* ─── BARRA DE ESTADO ───────────────────────────────────────── */
|
|
|
|
QStatusBar {
|
|
background-color: #0d7fd8;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
}
|
|
QStatusBar::item { border: none; }
|
|
QLabel#statusVersion { color: rgba(255,255,255,0.88); font-size: 11px; font-weight: bold; }
|
|
QLabel#statusLabel { color: rgba(255,255,255,0.70); font-size: 11px; }
|
|
QLabel#statusValue { color: #ffffff; font-size: 11px; font-weight: bold; }
|
|
|
|
/* ─── SCROLLBARS ────────────────────────────────────────────── */
|
|
|
|
QScrollBar:vertical { background: #2c3042; width: 10px; border: none; }
|
|
QScrollBar:horizontal { background: #2c3042; height: 10px; border: none; }
|
|
QScrollBar::handle:vertical { background: #484e62; border-radius: 5px; min-height: 24px; }
|
|
QScrollBar::handle:horizontal { background: #484e62; border-radius: 5px; min-width: 24px; }
|
|
QScrollBar::handle:vertical:hover, QScrollBar::handle:horizontal:hover { background: #7a8ba8; }
|
|
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { height: 0; }
|
|
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { width: 0; }
|
|
|
|
/* ─── BOTONES ───────────────────────────────────────────────── */
|
|
|
|
QPushButton {
|
|
background-color: #3e4255;
|
|
color: #e2e7f5;
|
|
border: 1px solid #575e74;
|
|
border-radius: 3px;
|
|
padding: 5px 14px;
|
|
min-width: 72px;
|
|
}
|
|
QPushButton:hover { background-color: #484e62; border-color: #7a8ba8; }
|
|
QPushButton:pressed { background-color: #4da8ff; color: #fff; border-color: #4da8ff; }
|
|
QPushButton:default { border-color: #4da8ff; }
|
|
QPushButton:disabled { color: #6b7792; border-color: #3e4255; }
|
|
|
|
/* ─── CAMPOS DE ENTRADA ─────────────────────────────────────── */
|
|
|
|
QLineEdit, QSpinBox, QDoubleSpinBox, QComboBox {
|
|
background-color: #343848;
|
|
color: #e2e7f5;
|
|
border: 1px solid #575e74;
|
|
border-radius: 3px;
|
|
padding: 4px 6px;
|
|
selection-background-color: #4da8ff;
|
|
}
|
|
QLineEdit:focus, QSpinBox:focus, QDoubleSpinBox:focus, QComboBox:focus {
|
|
border-color: #4da8ff;
|
|
}
|
|
QLineEdit:disabled, QSpinBox:disabled, QDoubleSpinBox:disabled {
|
|
color: #6b7792; background-color: #2c3042;
|
|
}
|
|
QComboBox::drop-down { border: none; width: 20px; }
|
|
QComboBox QAbstractItemView {
|
|
background-color: #343848; color: #e2e7f5;
|
|
border: 1px solid #575e74;
|
|
selection-background-color: #4da8ff;
|
|
}
|
|
|
|
/* ─── TABLAS Y LISTAS ───────────────────────────────────────── */
|
|
|
|
QHeaderView::section {
|
|
background-color: #343848; color: #9aa3bc;
|
|
border: none;
|
|
border-right: 1px solid #484e62;
|
|
border-bottom: 1px solid #484e62;
|
|
padding: 4px 8px; font-size: 12px;
|
|
}
|
|
QTableView, QListView {
|
|
background-color: #2c3042;
|
|
alternate-background-color: #2f3448;
|
|
color: #e2e7f5;
|
|
border: 1px solid #484e62;
|
|
gridline-color: #3e4255;
|
|
selection-background-color: #4da8ff;
|
|
selection-color: #fff;
|
|
}
|
|
QTableView::item:hover, QListView::item:hover { background-color: #3e4255; }
|
|
|
|
/* ─── ÁRBOL ─────────────────────────────────────────────────── */
|
|
|
|
QTreeWidget {
|
|
background-color: #2c3042;
|
|
alternate-background-color: #2f3448;
|
|
color: #e2e7f5;
|
|
border: none;
|
|
selection-background-color: #4da8ff;
|
|
selection-color: #fff;
|
|
font-size: 13px;
|
|
}
|
|
QTreeWidget::item { padding: 3px 4px; border: none; }
|
|
QTreeWidget::item:hover { background-color: #3e4255; }
|
|
QTreeWidget::item:selected { background-color: #4da8ff; color: #fff; }
|
|
QTreeWidget::branch { background-color: #2c3042; }
|
|
|
|
/* ─── PESTAÑAS ──────────────────────────────────────────────── */
|
|
|
|
QTabWidget::pane {
|
|
border: none;
|
|
border-top: 1px solid #484e62;
|
|
background-color: #2c3042;
|
|
}
|
|
QTabBar { background-color: #343848; }
|
|
QTabBar::tab {
|
|
background-color: #343848; color: #9aa3bc;
|
|
border: none; border-right: 1px solid #484e62;
|
|
padding: 6px 14px; min-width: 70px; font-size: 12px;
|
|
}
|
|
QTabBar::tab:selected {
|
|
background-color: #2c3042; color: #e2e7f5;
|
|
border-top: 2px solid #4da8ff;
|
|
}
|
|
QTabBar::tab:hover:!selected { background-color: #3e4255; color: #e2e7f5; }
|
|
|
|
/* ─── SPLITTER GENERAL (fuera de viewports) ─────────────────── */
|
|
|
|
QSplitter::handle { background-color: #484e62; }
|
|
QSplitter::handle:horizontal { width: 1px; }
|
|
QSplitter::handle:vertical { height: 1px; }
|
|
|
|
/* ─── MENSAJES / TOOLTIP ────────────────────────────────────── */
|
|
|
|
QMessageBox { background-color: #343848; }
|
|
QMessageBox QLabel { color: #e2e7f5; }
|
|
|
|
QToolTip {
|
|
background-color: #343848;
|
|
color: #e2e7f5;
|
|
border: 1px solid #575e74;
|
|
padding: 4px 6px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* ─── MÓDULO: CURVAS HIDROSTÁTICAS ─────────────────────────── */
|
|
|
|
QWidget#hydrostaticsChart { background-color: #1a1d30; }
|
|
|
|
QFrame#hydroInfoBar {
|
|
background-color: #1e2240;
|
|
border-bottom: 1px solid #2e3870;
|
|
}
|
|
QLabel#hydroInfoName {
|
|
color: #4da8ff;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
padding: 0 10px 0 4px;
|
|
letter-spacing: 1px;
|
|
}
|
|
QFrame#hydroInfoSep { color: #2e3870; }
|
|
QLabel#hydroInfoKey { color: #6878a0; font-size: 10px; padding: 0 2px; }
|
|
QLabel#hydroInfoVal {
|
|
color: #c8d8f0;
|
|
font-family: "Consolas", monospace;
|
|
font-size: 10px;
|
|
min-width: 46px;
|
|
}
|
|
QFrame#hydroChartSep { color: #2e3870; }
|
|
|
|
QScrollArea#hydroChartScroll, QWidget#hydroChartContainer {
|
|
background-color: #1a1d30;
|
|
border: none;
|
|
}
|
|
|
|
QLabel#hydroPlaceholder {
|
|
color: #3a4870;
|
|
font-size: 14px;
|
|
background-color: #1a1d30;
|
|
padding: 40px;
|
|
}
|
|
|
|
/* ─── Módulo 3: Estabilidad ─── */
|
|
GZCurveWidget {
|
|
background: #0A0E1A;
|
|
border: 1px solid #1A2540;
|
|
border-radius: 4px;
|
|
}
|
|
#gzChartTitle {
|
|
color: #00FFCC;
|
|
font-family: "Rajdhani", "Segoe UI", sans-serif;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 1px;
|
|
}
|
|
#gzPassLabel {
|
|
color: #00FF88;
|
|
font-family: "Consolas", "Courier New", monospace;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
}
|
|
#gzFailLabel {
|
|
color: #FF4444;
|
|
font-family: "Consolas", "Courier New", monospace;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
}
|