Moved hex viewer styles to separate QSS file
This commit is contained in:
@@ -177,6 +177,7 @@ qt_add_resources(
|
|||||||
|
|
||||||
# Hex viewer widget
|
# Hex viewer widget
|
||||||
"./UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui"
|
"./UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui"
|
||||||
|
"./UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/Stylesheets/HexViewerWidget.qss"
|
||||||
|
|
||||||
# Memory snapshots
|
# Memory snapshots
|
||||||
"./UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/UiFiles/SnapshotManager.ui"
|
"./UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/UiFiles/SnapshotManager.ui"
|
||||||
|
|||||||
@@ -41,12 +41,24 @@ namespace Bloom::Widgets
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
auto stylesheetFile = QFile(
|
||||||
|
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||||
|
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget"
|
||||||
|
+ "/Stylesheets/HexViewerWidget.qss"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (!widgetUiFile.open(QFile::ReadOnly)) {
|
if (!widgetUiFile.open(QFile::ReadOnly)) {
|
||||||
throw Exception("Failed to open HexViewerWidget UI file");
|
throw Exception("Failed to open HexViewerWidget UI file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stylesheetFile.open(QFile::ReadOnly)) {
|
||||||
|
throw Exception("Failed to open HexViewerWidget stylesheet file");
|
||||||
|
}
|
||||||
|
|
||||||
auto uiLoader = UiLoader(this);
|
auto uiLoader = UiLoader(this);
|
||||||
this->container = uiLoader.load(&widgetUiFile, this);
|
this->container = uiLoader.load(&widgetUiFile, this);
|
||||||
|
this->container->setStyleSheet(stylesheetFile.readAll());
|
||||||
this->container->setFixedSize(this->size());
|
this->container->setFixedSize(this->size());
|
||||||
this->container->setContentsMargins(0, 0, 0, 0);
|
this->container->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,119 @@
|
|||||||
|
#hex-viewer-container {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar,
|
||||||
|
#hex-viewer-container #search-bar {
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #41423f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #bottom-bar {
|
||||||
|
border-top: 1px solid #41423f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #bottom-bar QLabel {
|
||||||
|
font-size: 13px;
|
||||||
|
color: rgba(175, 177, 179, 0.72);
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #bottom-bar QLabel:disabled {
|
||||||
|
color: rgba(175, 177, 179, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar QToolButton {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
qproperty-buttonWidth: 24;
|
||||||
|
qproperty-buttonHeight: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar QToolButton:hover {
|
||||||
|
background-color: #41413b;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar QToolButton:checked {
|
||||||
|
background-color: #43433d;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar QToolButton:checked:disabled {
|
||||||
|
background-color: #3d3d39;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar #separator {
|
||||||
|
background-color: transparent;
|
||||||
|
border-right: 1px solid #41423f;
|
||||||
|
padding: 0;
|
||||||
|
min-width: 1px;
|
||||||
|
max-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar #highlight-stack-memory-btn,
|
||||||
|
#hex-viewer-container #tool-bar #highlight-focused-memory-btn,
|
||||||
|
#hex-viewer-container #tool-bar #highlight-hovered-rows-columns-btn,
|
||||||
|
#hex-viewer-container #tool-bar #display-annotations-btn,
|
||||||
|
#hex-viewer-container #tool-bar #display-ascii-btn {
|
||||||
|
qproperty-buttonWidth: 25;
|
||||||
|
qproperty-buttonHeight: 21;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar #go-to-address-input {
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 100px;
|
||||||
|
min-height: 15px;
|
||||||
|
max-height: 15px;
|
||||||
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #848486;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar #go-to-address-input:focus {
|
||||||
|
color: #afb1b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #tool-bar #go-to-address-input:disabled {
|
||||||
|
color: #686767;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container QScrollArea,
|
||||||
|
#hex-viewer-container #graphics-view {
|
||||||
|
background-color: #323330;
|
||||||
|
border: none;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #loading-hex-viewer-label {
|
||||||
|
color: #838386;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #bottom-bar #selection-count-label {
|
||||||
|
border: none;
|
||||||
|
border-left: 1px solid #41423f;
|
||||||
|
padding-left: 4px;
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container QScrollBar:vertical {
|
||||||
|
background-color: transparent;
|
||||||
|
width: 12px;
|
||||||
|
margin: 1px 3px 1px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #byte-item-address-container-context-menu.QMenu,
|
||||||
|
#hex-viewer-container #byte-item-address-container-context-menu QMenu {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hex-viewer-container #byte-item-address-container-context-menu.QMenu::item,
|
||||||
|
#hex-viewer-container #byte-item-address-container-context-menu QMenu::item {
|
||||||
|
padding-left: 10px;
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
@@ -78,126 +78,6 @@
|
|||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#hex-viewer-container {
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar,
|
|
||||||
#hex-viewer-container #search-bar {
|
|
||||||
background-color: transparent;
|
|
||||||
border-bottom: 1px solid #41423f;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #bottom-bar {
|
|
||||||
border-top: 1px solid #41423f;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #bottom-bar QLabel {
|
|
||||||
font-size: 13px;
|
|
||||||
color: rgba(175, 177, 179, 0.72);
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #bottom-bar QLabel:disabled {
|
|
||||||
color: rgba(175, 177, 179, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar QToolButton {
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
qproperty-buttonWidth: 24;
|
|
||||||
qproperty-buttonHeight: 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar QToolButton:hover {
|
|
||||||
background-color: #41413b;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar QToolButton:checked {
|
|
||||||
background-color: #43433d;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar QToolButton:checked:disabled {
|
|
||||||
background-color: #3d3d39;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar #separator {
|
|
||||||
background-color: transparent;
|
|
||||||
border-right: 1px solid #41423f;
|
|
||||||
padding: 0;
|
|
||||||
min-width: 1px;
|
|
||||||
max-width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar #highlight-stack-memory-btn,
|
|
||||||
#hex-viewer-container #tool-bar #highlight-focused-memory-btn,
|
|
||||||
#hex-viewer-container #tool-bar #highlight-hovered-rows-columns-btn,
|
|
||||||
#hex-viewer-container #tool-bar #display-annotations-btn,
|
|
||||||
#hex-viewer-container #tool-bar #display-ascii-btn {
|
|
||||||
qproperty-buttonWidth: 25;
|
|
||||||
qproperty-buttonHeight: 21;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar #go-to-address-input {
|
|
||||||
min-width: 100px;
|
|
||||||
max-width: 100px;
|
|
||||||
min-height: 15px;
|
|
||||||
max-height: 15px;
|
|
||||||
border: none;
|
|
||||||
background-color: transparent;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #848486;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar #go-to-address-input:focus {
|
|
||||||
color: #afb1b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #tool-bar #go-to-address-input:disabled {
|
|
||||||
color: #686767;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container QScrollArea,
|
|
||||||
#hex-viewer-container #graphics-view {
|
|
||||||
background-color: #323330;
|
|
||||||
border: none;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #loading-hex-viewer-label {
|
|
||||||
color: #838386;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #bottom-bar #selection-count-label {
|
|
||||||
border: none;
|
|
||||||
border-left: 1px solid #41423f;
|
|
||||||
padding-left: 4px;
|
|
||||||
min-width: 140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container QScrollBar:vertical {
|
|
||||||
background-color: transparent;
|
|
||||||
width: 12px;
|
|
||||||
margin: 1px 3px 1px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #byte-item-address-container-context-menu.QMenu,
|
|
||||||
#hex-viewer-container #byte-item-address-container-context-menu QMenu {
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hex-viewer-container #byte-item-address-container-context-menu.QMenu::item,
|
|
||||||
#hex-viewer-container #byte-item-address-container-context-menu QMenu::item {
|
|
||||||
padding-left: 10px;
|
|
||||||
min-width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Snapshot Manager */
|
/* Snapshot Manager */
|
||||||
#target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn {
|
#target-memory-inspection-pane #rh-side-bar #manage-memory-snapshots-btn {
|
||||||
border: none;
|
border: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user