Commit a2ae2a9a authored by Piotr Galiszewski's avatar Piotr Galiszewski

Force minimal hints width to 285px

Smaller hints look really bad
Signed-off-by: 's avatarPiotr Galiszewski <piotr.galiszewski@kadu.im>
Acked-by: Rafał Malinowski's avatarRafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
parent b30021fc
......@@ -17,8 +17,8 @@
<item value="2" caption="Bottom Left" />
<item value="3" caption="Bottom Right" />
</combo-box>
<spin-box caption="Minimum width" config-section="Hints" config-item="MinimumWidth" min-value="0" max-value="10240" id="hints/minimumWidth" suffix=" px" />
<spin-box caption="Maximum width" config-section="Hints" config-item="MaximumWidth" min-value="0" max-value="10240" id="hints/maximumWidth" suffix=" px" />
<spin-box caption="Minimum width" config-section="Hints" config-item="MinimumWidth" min-value="285" max-value="10240" id="hints/minimumWidth" suffix=" px" />
<spin-box caption="Maximum width" config-section="Hints" config-item="MaximumWidth" min-value="285" max-value="10240" id="hints/maximumWidth" suffix=" px" />
<action-button caption="Hints position preview" id="hints/preview" />
</group-box>
<group-box name="Mouse Buttons">
......
......@@ -171,9 +171,12 @@ void HintManager::setHint()
return;
}
int minimumWidth = config_file.readNumEntry("Hints", "MinimumWidth", 100);
int minimumWidth = config_file.readNumEntry("Hints", "MinimumWidth", 285);
int maximumWidth = config_file.readNumEntry("Hints", "MaximumWidth", 500);
minimumWidth = minimumWidth >= 285 ? minimumWidth : 285;
maximumWidth = maximumWidth >= 285 ? maximumWidth : 285;
QPoint newPosition;
QPoint trayPosition;
......@@ -737,7 +740,7 @@ void HintManager::createDefaultConfiguration()
config_file.addVariable("Hints", "RightButton", 2);
config_file.addVariable("Hints", "MaximumWidth", 500);
config_file.addVariable("Hints", "MiddleButton", 3);
config_file.addVariable("Hints", "MinimumWidth", 100);
config_file.addVariable("Hints", "MinimumWidth", 285);
config_file.addVariable("Hints", "MouseOverUserSyntax", QString());
config_file.addVariable("Hints", "NewHintUnder", 0);
config_file.addVariable("Hints", "ShowContentMessage", true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment