Skip to content

Commit

Permalink
Fix layout for DE language
Browse files Browse the repository at this point in the history
  • Loading branch information
viettrungphan committed Jun 1, 2021
1 parent 97d0570 commit b287b52
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
31 changes: 15 additions & 16 deletions hidden/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,17 @@
<objects>
<viewController storyboardIdentifier="prefVC" showSeguePresentationStyle="single" id="XfG-lQ-9wD" customClass="PreferencesViewController" customModule="Hidden_Bar" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="613" height="481"/>
<rect key="frame" x="0.0" y="0.0" width="668" height="481"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<box autoresizesSubviews="NO" boxType="custom" borderType="none" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Jjd-1G-63n">
<rect key="frame" x="0.0" y="215" width="613" height="266"/>
<rect key="frame" x="0.0" y="215" width="668" height="266"/>
<view key="contentView" id="TZd-5p-NFL">
<rect key="frame" x="0.0" y="0.0" width="613" height="266"/>
<rect key="frame" x="0.0" y="0.0" width="668" height="266"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RGE-Xv-zm5">
<rect key="frame" x="161" y="8" width="291" height="32"/>
<rect key="frame" x="189" y="8" width="291" height="32"/>
<textFieldCell key="cell" alignment="center" id="k7C-e5-6a0">
<font key="font" metaFont="system"/>
<string key="title">In your Mac's menu bar, hold ⌘ and drag icons
Expand All @@ -449,7 +449,7 @@ between sections to configure Hidden Bar.</string>
</textFieldCell>
</textField>
<stackView distribution="fillEqually" orientation="horizontal" alignment="centerY" spacing="16" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pJz-eb-ydI">
<rect key="frame" x="87" y="206" width="439" height="22"/>
<rect key="frame" x="115" y="206" width="439" height="22"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aFM-dG-B8C">
<rect key="frame" x="0.0" y="1" width="20" height="20"/>
Expand Down Expand Up @@ -622,10 +622,10 @@ between sections to configure Hidden Bar.</string>
</textFieldCell>
</textField>
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="35" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="I1C-Eb-1or">
<rect key="frame" x="16" y="20" width="581" height="133"/>
<rect key="frame" x="16" y="20" width="636" height="133"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="do4-pv-o3U">
<rect key="frame" x="0.0" y="0.0" width="315" height="133"/>
<rect key="frame" x="0.0" y="0.0" width="328" height="133"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cbR-Jv-adm">
<rect key="frame" x="-2" y="116" width="207" height="18"/>
Expand Down Expand Up @@ -695,7 +695,7 @@ between sections to configure Hidden Bar.</string>
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="2" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bf8-qr-hjT">
<rect key="frame" x="0.0" y="0.0" width="315" height="25"/>
<rect key="frame" x="0.0" y="0.0" width="328" height="25"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gj1-Ms-4No">
<rect key="frame" x="-2" y="4" width="206" height="22"/>
Expand All @@ -711,7 +711,7 @@ between sections to configure Hidden Bar.</string>
</connections>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="T6r-65-Oor">
<rect key="frame" x="203" y="1" width="110" height="25"/>
<rect key="frame" x="203" y="1" width="123" height="25"/>
<popUpButtonCell key="cell" type="push" title="5 seconds" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="bzS-lm-JvT" id="SPt-Y3-pjj">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
Expand All @@ -730,7 +730,7 @@ between sections to configure Hidden Bar.</string>
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Hg0-zx-srA">
<rect key="frame" x="309" y="7" width="8" height="16"/>
<rect key="frame" x="322" y="7" width="8" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title=" " id="ERh-JM-snt">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -741,8 +741,7 @@ between sections to configure Hidden Bar.</string>
<constraints>
<constraint firstItem="Hg0-zx-srA" firstAttribute="centerY" secondItem="gj1-Ms-4No" secondAttribute="centerY" id="FQf-eC-BlM"/>
<constraint firstItem="T6r-65-Oor" firstAttribute="centerY" secondItem="gj1-Ms-4No" secondAttribute="centerY" id="IJi-2B-k5w"/>
<constraint firstItem="Hg0-zx-srA" firstAttribute="leading" secondItem="gj1-Ms-4No" secondAttribute="trailing" constant="107" id="Uic-p2-7gT"/>
<constraint firstItem="Hg0-zx-srA" firstAttribute="leading" secondItem="gj1-Ms-4No" secondAttribute="trailing" constant="107" id="aNS-SZ-6jG"/>
<constraint firstItem="Hg0-zx-srA" firstAttribute="leading" secondItem="gj1-Ms-4No" secondAttribute="trailing" constant="120" id="Uic-p2-7gT"/>
<constraint firstAttribute="height" constant="25" id="dVP-Ed-gEx"/>
</constraints>
<visibilityPriorities>
Expand Down Expand Up @@ -773,18 +772,18 @@ between sections to configure Hidden Bar.</string>
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="vertical" alignment="centerX" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NOW-ql-i4U">
<rect key="frame" x="350" y="58" width="231" height="75"/>
<rect key="frame" x="363" y="58" width="273" height="75"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S0D-Ve-YKP">
<rect key="frame" x="62" y="58" width="108" height="17"/>
<rect key="frame" x="83" y="58" width="108" height="17"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Global Shortcut" id="HJP-Lf-rxm">
<font key="font" metaFont="systemMedium" size="14"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="mtL-vU-2iq">
<rect key="frame" x="20" y="-4" width="191" height="56"/>
<rect key="frame" x="41" y="-4" width="191" height="56"/>
<view key="contentView" id="N9Y-29-pHK">
<rect key="frame" x="3" y="3" width="185" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -874,7 +873,7 @@ between sections to configure Hidden Bar.</string>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-295" y="827.5"/>
<point key="canvasLocation" x="-323" y="827.5"/>
</scene>
</scenes>
<resources>
Expand Down
11 changes: 10 additions & 1 deletion hidden/Features/Preferences/PreferencesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,16 @@ extension PreferencesViewController {
label.stringValue = text
label.isBezeled = false
label.isEditable = false
controller.view = label
let view = NSView()
view.addSubview(label)
NSLayoutConstraint.activate([
label.topAnchor.constraint(equalTo: view.topAnchor),
label.bottomAnchor.constraint(equalTo: view.bottomAnchor),
label.leadingAnchor.constraint(equalTo: view.leadingAnchor),
label.trailingAnchor.constraint(equalTo: view.trailingAnchor)
])
label.translatesAutoresizingMaskIntoConstraints = false
controller.view = view

let popover = NSPopover()
popover.contentViewController = controller
Expand Down
6 changes: 3 additions & 3 deletions hidden/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"Tutorial text" = "
Verwende die “permanent ausgeblendet“ Funktion um deine Menüleistensymbole aufgeräumt zu halten.. Und so funktioniert es..
Zum einschalten:
1. Aktiviere permanent ausgeblendet “􀥤 (transluzenter Farbstreifen)
1. Aktiviere permanent ausgeblendet “􀥤 (transluzenter Farbstreifen)
2. Halte 􀆔 und ziehe es auf die linke Seite der normalen Leiste, verschiebe dann die Symbole die ausgeblendet werden sollen auf die linke Seite dieser Leiste.
3. Abschließend klicke mit der rechten Maustaste auf das Einklappen Symbol “􀆊 um sie auszublenden.
3. Abschließend klicke mit der rechten Maustaste auf das Einklappen Symbol “􀆊 um sie auszublenden.
Zum Anzeigen der permanent ausgeblendeten Symbole:
1. Klicke mit der rechten Maustaste nochmals auf das Einklappen Symbol “􀆊 um sie anzuzeigen und wiederhole den Schritt um die Funktion zu aktivieren. Viel Spaß 😉!
1. Klicke mit der rechten Maustaste nochmals auf das Einklappen Symbol “􀆊 um sie anzuzeigen und wiederhole den Schritt um die Funktion zu aktivieren. Viel Spaß 😉!
";

0 comments on commit b287b52

Please sign in to comment.