Skip to content

Commit 105b56e

Browse files
committed
Style updates
1 parent d9323bf commit 105b56e

File tree

10 files changed

+68
-101
lines changed

10 files changed

+68
-101
lines changed

Packages/com.quickeye.http-debugger/Editor/Elements/ConsoleCells.cs

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,52 @@
22

33
namespace QuickEye.WebTools.Editor
44
{
5-
internal class StatusCodeCell : Label
5+
internal class MethodCell : Label
66
{
7-
public StatusCodeCell()
7+
public MethodCell()
88
{
99
AddToClassList("cell-text");
10+
AddToClassList("method-cell");
11+
}
1012

11-
AddToClassList("code-cell");
12-
AddToClassList("status-code");
13+
public void Setup(string method)
14+
{
15+
text = FormatHttpMethodType(method);
1316
}
1417

15-
public void Setup(int statusCode)
18+
private static string FormatHttpMethodType(string value)
1619
{
17-
text = statusCode.ToString();
18-
HttpStatusCodeUtil.ToggleStatusCodeClass(this, statusCode);
20+
return value[..3].ToUpperInvariant();
1921
}
2022
}
2123

22-
internal class MethodCell : Label
24+
internal class IdCell : VisualElement
2325
{
24-
public MethodCell()
25-
{
26-
AddToClassList("cell-text");
27-
28-
AddToClassList("type-cell");
29-
}
26+
private readonly Label _label;
27+
private readonly BreakpointToggle _breakpointToggle;
3028

31-
public void Setup(string method)
29+
public IdCell()
3230
{
33-
text = FormatHttpMethodType(method);
31+
Add(_label = new Label());
32+
Add(_breakpointToggle = new BreakpointToggle());
33+
_label.AddToClassList("cell-text");
34+
AddToClassList("id-cell");
3435
}
3536

36-
private string FormatHttpMethodType(string value)
37+
public void Setup(string id)
3738
{
38-
return value[..3].ToUpperInvariant();
39+
_label.text = id;
40+
_breakpointToggle.BreakpointName = id;
3941
}
4042
}
4143

42-
internal class UrlCell : TextField
44+
internal class UrlCell : Label
4345
{
4446
public UrlCell()
4547
{
4648
AddToClassList("cell-text");
4749
AddToClassList("url-cell");
48-
textInputBase.AddToClassList("url-cell--text-input");
49-
isReadOnly = true;
50+
selection.isSelectable = true;
5051
}
5152

5253
public void Setup(string url)
@@ -55,23 +56,19 @@ public void Setup(string url)
5556
}
5657
}
5758

58-
internal class IdCell : VisualElement
59+
internal class ResultCell : Label
5960
{
60-
private readonly Label _label;
61-
private readonly BreakpointToggle _breakpointToggle;
62-
63-
public IdCell()
61+
public ResultCell()
6462
{
65-
Add(_label = new Label());
66-
Add(_breakpointToggle = new BreakpointToggle());
67-
_label.AddToClassList("cell-text");
68-
AddToClassList("id-cell");
63+
AddToClassList("cell-text");
64+
AddToClassList("result-cell");
65+
AddToClassList("status-code");
6966
}
7067

71-
public void Setup(string id)
68+
public void Setup(int statusCode)
7269
{
73-
_label.text = id;
74-
_breakpointToggle.BreakpointName = id;
70+
text = statusCode.ToString();
71+
HttpStatusCodeUtil.ToggleStatusCodeClass(this, statusCode);
7572
}
7673
}
7774
}

Packages/com.quickeye.http-debugger/Editor/Resources/QuickEye/HttpDebugger/Common.uss

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
white-space: normal;
2121
}
2222

23-
.sidebar {
24-
width: 180px;
25-
}
26-
2723
.header-toolbar {
2824
height: 25px;
2925
border-top-width: 0;
@@ -55,57 +51,32 @@
5551
}
5652

5753
.status-code {
58-
border-radius: 0;
59-
6054
padding-left: 3px;
6155
padding-right: 3px;
6256
padding-top: 3px;
6357
padding-bottom: 3px;
64-
color: rgb(255, 255, 255);
65-
/*-unity-font: resource('QuickEye/HttpDebugger/RobotoMono-Regular');*/
66-
/*-unity-font-definition: none;*/
67-
-unity-text-align: middle-center;
68-
/*border-left-width: 1px;*/
6958
border-right-width: 2px;
70-
border-left-color: rgb(17, 17, 17);
71-
border-right-color: rgb(17, 17, 17);
72-
border-top-color: rgb(17, 17, 17);
73-
border-bottom-color: rgb(17, 17, 17);
59+
-unity-text-align: middle-center;
7460
}
7561

7662
.status-code-100 {
77-
border-left-color: rgb(36, 166, 186);
7863
border-right-color: rgb(36, 166, 186);
79-
border-top-color: rgb(36, 166, 186);
80-
border-bottom-color: rgb(36, 166, 186);
8164
}
8265

8366
.status-code-200 {
84-
border-radius: 0;
8567
border-width: 0;
86-
border-left-color: rgb(98, 156, 30);
87-
color: var(--unity-colors-default-text-hover);
8868
}
8969

9070
.status-code-300 {
91-
border-left-color: rgb(186, 36, 122);
9271
border-right-color: rgb(186, 36, 122);
93-
border-top-color: rgb(186, 36, 122);
94-
border-bottom-color: rgb(186, 36, 122);
9572
}
9673

9774
.status-code-400 {
98-
border-left-color: rgb(197, 113, 2);
9975
border-right-color: rgb(197, 113, 2);
100-
border-top-color: rgb(197, 113, 2);
101-
border-bottom-color: rgb(197, 113, 2);
10276
}
10377

10478
.status-code-500 {
105-
border-left-color: rgb(236, 54, 2);
10679
border-right-color: rgb(236, 54, 2);
107-
border-top-color: rgb(236, 54, 2);
108-
border-bottom-color: rgb(236, 54, 2);
10980
}
11081

11182
DropdownButton {

Packages/com.quickeye.http-debugger/Editor/UIAssets/ExchangeInspector.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -----------------------
22
// script auto-generated
33
// any changes to this file will be lost on next code generation
4-
// com.quickeye.ui-toolkit-plus ver: 1.6.0
4+
// com.quickeye.ui-toolkit-plus ver: 1.7.0
55
// -----------------------
66
using UnityEngine.UIElements;
77

Packages/com.quickeye.http-debugger/Editor/UIAssets/RequestConsole.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,16 @@ private void SetupDropdownMenu()
113113

114114
private void InitColumns()
115115
{
116-
resultCol.makeCell = () => new StatusCodeCell();
116+
timeCol.makeCell = () => new Label();
117+
timeCol.bindCell = (element, i) =>
118+
{
119+
((Label)element).text = ((ConsoleRequestData)Source[i]).timestamp.ToString();
120+
};
121+
122+
resultCol.makeCell = () => new ResultCell();
117123
resultCol.bindCell = (element, i) =>
118124
{
119-
((StatusCodeCell)element).Setup(Source[i].lastResponse?.statusCode ?? 0);
125+
((ResultCell)element).Setup(Source[i].lastResponse?.statusCode ?? 0);
120126
AddContextMenu(element, i);
121127
};
122128

Packages/com.quickeye.http-debugger/Editor/UIAssets/RequestConsole.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -----------------------
22
// script auto-generated
33
// any changes to this file will be lost on next code generation
4-
// com.quickeye.ui-toolkit-plus ver: 1.6.0
4+
// com.quickeye.ui-toolkit-plus ver: 1.7.0
55
// -----------------------
66
using UnityEngine.UIElements;
77

Packages/com.quickeye.http-debugger/Editor/UIAssets/RequestConsole.style.uss

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,44 @@
44
-unity-text-align: middle-left;
55
}
66

7-
.status-code.code-cell {
8-
margin-bottom: 2px;
9-
margin-top: 2px;
7+
.method-cell {
8+
margin-left: 3px;
9+
margin-right: 2px;
1010
-unity-text-align: middle-center;
1111
}
1212

13-
.type-cell {
14-
/*-unity-font-style: bold;*/
13+
.skin--dark .method-cell {
1514
color: var(--unity-colors-default-text-hover);
15+
}
1616

17-
width: 28px;
18-
margin-left: 3px;
19-
margin-right: 2px;
17+
.id-cell {
18+
flex-grow: 1;
19+
flex-direction: row;
20+
align-items: center;
21+
}
22+
23+
.skin--dark .result-cell {
24+
color: var(--unity-colors-default-text-hover);
25+
}
26+
27+
.result-cell {
28+
margin-bottom: 2px;
29+
margin-top: 2px;
2030
-unity-text-align: middle-center;
2131
}
2232

33+
2334
.url-cell {
24-
font-size: 10px;
35+
font-size: 11px;
2536
}
2637

27-
.url-cell--text-input {
28-
border-left-width: 0;
29-
border-right-width: 0;
30-
border-top-width: 0;
31-
border-bottom-width: 0;
32-
border-top-left-radius: 0;
33-
border-bottom-left-radius: 0;
34-
border-top-right-radius: 0;
35-
border-bottom-right-radius: 0;
36-
border-left-color: rgba(0, 0, 0, 0);
37-
border-right-color: rgba(0, 0, 0, 0);
38-
border-top-color: rgba(0, 0, 0, 0);
39-
border-bottom-color: rgba(0, 0, 0, 0);
40-
background-color: rgba(0, 0, 0, 0);
41-
color: rgb(109, 158, 255);
38+
.unity-collection-view:focus .unity-collection-view__item--selected .url-cell {
39+
color: white;
4240
}
4341

4442
#clear-button {
4543
-unity-text-align: middle-left;
4644
border-left-width: 0;
4745
min-width: 43px;
4846
left: 0;
49-
}
50-
51-
.id-cell {
52-
flex-grow: 1;
53-
flex-direction: row;
54-
align-items: center;
55-
}
47+
}

Packages/com.quickeye.http-debugger/Editor/UIAssets/RequestView.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -----------------------
22
// script auto-generated
33
// any changes to this file will be lost on next code generation
4-
// com.quickeye.ui-toolkit-plus ver: 1.6.0
4+
// com.quickeye.ui-toolkit-plus ver: 1.7.0
55
// -----------------------
66
using UnityEngine.UIElements;
77

Packages/com.quickeye.http-debugger/Editor/UIAssets/ResponseView.gen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -----------------------
22
// script auto-generated
33
// any changes to this file will be lost on next code generation
4-
// com.quickeye.ui-toolkit-plus ver: 1.6.0
4+
// com.quickeye.ui-toolkit-plus ver: 1.7.0
55
// -----------------------
66
using UnityEngine.UIElements;
77

Packages/com.quickeye.http-debugger/Editor/Windows/RequestConsoleWindow.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ protected override void OnEnable()
1818
titleContent = EditorGUIUtility.IconContent("UnityEditor.ConsoleWindow");
1919
titleContent.text = "Request Console";
2020
_database = RequestConsoleDatabase.instance;
21+
rootVisualElement.AddToClassList(EditorGUIUtility.isProSkin ? "skin--dark" : "skin--light");
2122
requestConsole.Init(rootVisualElement);
2223
requestConsole.Setup(_database.requests);
2324
requestConsole.SelectionChanged += request => { ExchangeInspectorWindow.Select(request, true); };

Packages/packages-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"depth": 0,
1414
"source": "git",
1515
"dependencies": {},
16-
"hash": "d102d6ee1176b5984a956999da0d7a8b7e225d1c"
16+
"hash": "91da1260c2af927aa56fbec26b03871a8fc7941d"
1717
},
1818
"com.quickeye.utility": {
1919
"version": "https://github.com/ErnSur/QuickEye-Utility.git",

0 commit comments

Comments
 (0)