Browse Source

【2025】【综合】多页签UI问题处理

niehaoyu 4 weeks ago
parent
commit
9673ef3c27

+ 7 - 7
PDF Office/PDF Master/Class/ChromiumTabs/resources/KMChromiumTabView.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment version="1080" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -27,19 +27,19 @@
             <subviews>
                 <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="50">
                     <rect key="frame" x="140" y="7" width="12" height="12"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="12" id="hhW-6Z-7cn"/>
-                        <constraint firstAttribute="width" constant="12" id="tHk-q0-WLi"/>
-                    </constraints>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_btn_close_multitab_12" imagePosition="overlaps" alignment="center" inset="2" id="51">
                         <behavior key="behavior" lightByContents="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="12" id="hhW-6Z-7cn"/>
+                        <constraint firstAttribute="width" constant="12" id="tHk-q0-WLi"/>
+                    </constraints>
                     <connections>
                         <action selector="closeTab:" target="-2" id="54"/>
                     </connections>
                 </button>
-                <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="94">
+                <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="94">
                     <rect key="frame" x="34" y="5" width="108" height="15"/>
                     <textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" alignment="left" title="Label" id="95">
                         <font key="font" metaFont="cellTitle"/>

+ 5 - 1
PDF Office/PDF Master/Class/ChromiumTabs/src/Tab/CTTabController.m

@@ -169,7 +169,7 @@ static NSString* const kBrowserThemeDidChangeNotification =
         self->titleView_.alignment = NSTextAlignmentCenter;
     }
 
-    image_label_spacing_.constant = iconImage_.hidden ? - iconImage_.frame.size.width : self.horizontalPadding;
+    image_label_spacing_.constant = iconImage_.hidden ? - iconImage_.frame.size.width : 8;
 
     self.tabView.wantsLayer = YES;
     NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
@@ -191,6 +191,10 @@ static NSString* const kBrowserThemeDidChangeNotification =
     NSColor *text_Hov_Dark = [NSColor km_initWithHex:@"#C8C9CC" alpha:1];
     NSColor *text_Sel_Dark = [NSColor km_initWithHex:@"#C8C9CC" alpha:1];
     
+    self.borderRadiusTopLeft = 4;
+    self.borderRadiusTopLeft_hov = 4;
+    self.borderRadiusTopLeft_sel = 4;
+    
     if (state_ == KMDesignTokenStateNorm) {
         self.tabView.layer.backgroundColor = isDarkModel ? backgroundColor_Norm_Dark.CGColor : backgroundColor_Norm.CGColor;
         self.tabView.layer.borderColor = self.borderColor.CGColor;